Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable spring security in spring boot 2.0.2

I'm trying to disable spring security in spring boot 2.0.2 by adding the security.ignore=/** property but It's not working with me.

My 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=/**

The result:

enter image description here

like image 424
azguindou Avatar asked Jan 29 '23 01:01

azguindou


1 Answers

Add this Java Annotations in your main file spring boot application.

@EnableAutoConfiguration(exclude = { 
    SecurityAutoConfiguration.class 
})
like image 89
Wilmer Villca Avatar answered Jan 31 '23 09:01

Wilmer Villca