How to get past the Authentication Required Spring-boot Security

前端 未结 5 1124
无人共我
无人共我 2021-02-12 17:18

I have put in the password which is \"root\" and it keeps popping back up. How can I suppress this or get rid of it. I am using spring boot and spring security.

5条回答
  •  甜味超标
    2021-02-12 17:55

    You can bypass this spring boot security mechanism. See an example below for this:

    @SpringBootApplication
    @EnableAutoConfiguration(exclude = {SecurityAutoConfiguration.class})
    public class SampleSpringBootApplication {
    
        public static void main(String[] args) {
            SpringApplication.run(SampleSpringBootApplication.class, args);
        }
    }
    

提交回复
热议问题