Remove “Using default security password” on Spring Boot

后端 未结 18 2170
小鲜肉
小鲜肉 2020-12-04 12:13

I added one custom Security Config in my application on Spring Boot, but the message about \"Using default security password\" is still there in LOG file.

Is there a

18条回答
  •  离开以前
    2020-12-04 12:41

    If you have enabled actuator feature (spring-boot-starter-actuator), additional exclude should be added in application.yml:

    spring:
      autoconfigure:
        exclude: org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration,org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration
    

    Tested in Spring Boot version 2.3.4.RELEASE.

提交回复
热议问题