spring 容器配置
SpringBoot工程启动会自动扫描启动类所在包下的所有Bean,加载到spring容器。
1)Spring Boot配置文件
在resources下添加application.properties,内容如下:
application.properties
server.port=8080
server.servlet.context-path=/security-springboot
spring.application.name = security-springboot
spring.mvc.view.prefix=/WEB-INF/view/
spring.mvc.view.suffix=.jsp
2)Spring Boot 启动类
SecuritySpringBootApp.java
package com.dym.security.springboot;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.