Cannot resolve configuration property 'spring.security.enabled'
时间: 2024-05-22 20:14:53 浏览: 184
This error occurs when Spring Boot is unable to find the configuration property 'spring.security.enabled'.
To resolve this issue, you can try the following steps:
1. Make sure you have added the necessary dependencies in your project for Spring Security. You can do this by adding the following to your build.gradle file:
implementation 'org.springframework.boot:spring-boot-starter-security'
2. Check your application.properties file and ensure that you have added the correct property 'spring.security.enabled'. The correct syntax is:
spring.security.enabled=true
3. If you are using YAML file, the syntax will be:
spring:
security:
enabled: true
4. If you are still facing issues, try to clean and rebuild your project. This will help to ensure that any changes made to the configuration files are picked up by Spring Boot.
If the issue still persists, you can check the Spring Boot documentation or seek help from the Spring Boot community forums for further assistance.
阅读全文