如图,一启动就出现下图登录界面
原因很简单就是被拦截了。pom.xml中引入了下面的包,注释掉就可以了。当然如果用了shiro等权限框架也可能出现类似问题。谁copy进来的,盘他。
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-security --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-web</artifactId> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-config</artifactId> </dependency>