![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
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 · 3121 阅读 · 2 评论 -
Springboot ServletContextListener 注入失败解决方案
在spring boot 使用过程中可能会需要自定义个servletContextListener 并有可能需要注入spring管理的类,这里需要在init方法中增加一点配置,如下代码:@WebListener public class AuthServletContextListener implements ServletContextListener { @Autowired p原创 2016-12-01 20:11:29 · 6905 阅读 · 0 评论 -
springboot 使用传统方式部署
spring boot默认创建出来的应用程序是内嵌web容器的,直接运行jar文件就可以的,但通常我们也需要将程序部署到tomcat中,这需要做如下改进: 1.pom.xml修改 打包方式需要修改成war:war spring-boot-starter-web的配置中需要排除tomcat org.springframework.boot spring-boot-starter-w原创 2016-11-20 14:12:01 · 1622 阅读 · 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 · 1862 阅读 · 0 评论 -
spring boot 整合 spring security 之使用数据库验证
spring boot 整合 spring security 参见上一篇文章.重写WebSecurityConfigurerAdapter中的configureGlobal方法@Autowired public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { auth.authenticat原创 2016-11-26 08:18:36 · 5406 阅读 · 0 评论