Spring Security using HTTP headers

前端 未结 4 914
青春惊慌失措
青春惊慌失措 2021-02-14 12:05

I am trying to add security to my Spring Boot application. My current application is using REST controllers and every time I get a GET or POST request

4条回答
  •  执念已碎
    2021-02-14 12:52

    In spring boot app you can add below to application.properties

    security.user.name=user
    security.user.password=password
    

    It will do rest of the thing like getting it from header and validation for more visit https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-security.html

提交回复
热议问题