SpringBoot-SpringSecurity集成-修定
2016-12-27 18:34
393 查看
原文地址:http://blog.csdn.net/ABAP_Brave/article/details/53032694
原文的 pom.xml 文件不全。
原文没有给定启动类。
对于原文的缺失此处补全。
此篇是初级篇
如有兴趣请看 高级篇一:
springboot+mybatis+SpringSecurity 实现用户角色数据库管理
高级篇二
springBoot+springSecurity 数据库动态管理用户、角色、权限(二)
原文的 pom.xml 文件不全。
原文没有给定启动类。
对于原文的缺失此处补全。
此篇是初级篇
如有兴趣请看 高级篇一:
springboot+mybatis+SpringSecurity 实现用户角色数据库管理
高级篇二
springBoot+springSecurity 数据库动态管理用户、角色、权限(二)
pom.xml
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.us.Example</groupId> <artifactId>springSecurity</artifactId> <version>1.0-SNAPSHOT</version> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.3.0.RELEASE</version> </parent> <properties> <start-class>com.us.WebApplication</start-class> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.source>1.8</maven.compiler.source> </properties> <dependencies> <!-- 核心模块,包括自动配置支持、日志和YAML --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> </dependency> <!-- 测试模块,包括JUnit、Hamcrest、Mockito --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <!-- 引入Web模块 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!-- SpringSecurity依赖 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> </dependencies> </project>
Application.java
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.ConfigurableApplicationContext; import static org.springframework.boot.SpringApplication.*; @SpringBootApplication public class Application { public static void main(String[] args) { ConfigurableApplicationContext run = run(Application.class, args); } }
相关文章推荐
- Springboot 集成 javamail发送邮件535错误
- SpringBoot 集成Swagger
- SpringBoot学习(六)--SpringBoot集成swagger在线API文档工具
- SpringBoot利用redis集成消息队列
- springboot 集成 spring-data-jpa
- springboot 集成cxf
- SpringBoot集成MyBatis Generator代码生成器
- springboot集成mybatis
- SpringBoot集成SpringSecurity+CAS
- SpringBoot集成redisson分布式锁
- SpringBoot集成MyBatis
- springboot集成swagger2
- 基于java config的springSecurity(六)--集成spring session
- 详解SpringBoot集成jsp(附源码)+遇到的坑
- SpringBoot入门-17(springboot集成mybatis注解形式实现ID自动增长)
- springboot注解方式集成Mybatis
- 13.9 SpringBoot集成Swagger2中遇到的问题
- ElasticSearch集成springboot
- MongoDB-6:集成MongoBD到SpringBoot
- SpringBoot 2.x 集成QQ邮箱、网易系邮箱、Gmail邮箱发送邮件