gpt4 book ai didi

spring-boot - 在 spring boot 2.0.2 中禁用 spring security

转载 作者:行者123 更新时间:2023-12-03 20:30:05 25 4
gpt4 key购买 nike

我试图通过添加 security.ignore=/** 在 spring boot 2.0.2 中禁用 spring 安全性属性(property),但它对我不起作用。

我的 application.properties:

spring.datasource.url = jdbc:mysql://localhost:3306/smile
spring.datasource.username = root
spring.datasource.password =
spring.datasource.driverClassName = com.mysql.jdbc.Driver
spring.jpa.hibernate.ddl-auto = update
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect

# suppress inspection "SpringBootApplicationProperties"
security.ignored=/**

结果:

enter image description here

最佳答案

在您的主文件 spring boot 应用程序中添加此 Java 注释。

@EnableAutoConfiguration(exclude = { 
SecurityAutoConfiguration.class
})

关于spring-boot - 在 spring boot 2.0.2 中禁用 spring security,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50505402/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com