springboot 2.2.1默认跳到登录页

最新的springboot 2.2.1版本,启动之后访问http://localhost:8080 会直接跳转到默认登录页,是由于springboot默认配置了安全策略,在启动类中忽略该配置即可

 

在启动类添加以下配置:

@SpringBootApplication(exclude = {SecurityAutoConfiguration.class})
posted @ 2019-11-14 13:19  大刀客  阅读(1967)  评论(0编辑  收藏  举报