springboot关闭http登录验证

 springboot 2.0 因为引入了下面的security配置,会导致每次在访问的时候都需要输入用户名和密码

        
            org.springframework.boot
            spring-boot-starter-security
        

springboot2.0版本如果要关掉http登录验证,需要在application类上直接加入exclude配置

@SpringBootApplication(exclude = {
        org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class
})

 

你可能感兴趣的:(spring)