spring-boot
蜗牛_snail
蜗牛_snail
展开
-
spring boot ehcache整合
pom.xml配置 引入依赖包<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-cache</artifactId></dependency><dependency> <groupId>net.sf.ehcache</groupId> <原创 2016-11-30 20:54:22 · 3110 阅读 · 2 评论 -
Springboot ServletContextListener 注入失败解决方案
在spring boot 使用过程中可能会需要自定义个servletContextListener 并有可能需要注入spring管理的类,这里需要在init方法中增加一点配置,如下代码:@WebListenerpublic class AuthServletContextListener implements ServletContextListener { @Autowired p原创 2016-12-01 20:11:29 · 6836 阅读 · 0 评论 -
springboot 使用传统方式部署
spring boot默认创建出来的应用程序是内嵌web容器的,直接运行jar文件就可以的,但通常我们也需要将程序部署到tomcat中,这需要做如下改进:1.pom.xml修改打包方式需要修改成war:warspring-boot-starter-web的配置中需要排除tomcatorg.springframework.bootspring-boot-starter-w原创 2016-11-20 14:12:01 · 1607 阅读 · 0 评论 -
Spring boot 整合 spring security
Spring boot 整合 spring security在pom.xml中添加spring security的引用重写WebSecurityConfigurerAdapter类中的configure方法和configureGlobal方法编写测试方法在pom.xml中添加spring security的引用<dependency> <groupId>org.springframe原创 2016-11-26 07:53:04 · 1837 阅读 · 0 评论 -
spring boot 整合 spring security 之使用数据库验证
spring boot 整合 spring security 参见上一篇文章.重写WebSecurityConfigurerAdapter中的configureGlobal方法@Autowiredpublic void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { auth.authenticat原创 2016-11-26 08:18:36 · 5377 阅读 · 0 评论