spring
梦--现实
站在巨人的肩上看世界
展开
-
spring bean的作用域
Spring 中有五种作用域,但是有三种只适用在web环境 下面我们来介绍一下 singleton 和 prototype Singleton 作用域 我们先通过idea 创建一个项目,然后创建一个NewCar 类拥有两个方法如下: public class NewCar { private String content; public void prints() { ...原创 2019-03-05 16:51:52 · 114 阅读 · 0 评论 -
spring 加载多个常量配置文件的问题??
今天新建了一个shiro.properties配置文件,将文件引入到shiro.xml 配置文件中为了替换文件中的占位符信息。结果出现了下面的异常信息: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'simpleCookie' defined in...原创 2019-03-26 11:56:34 · 248 阅读 · 0 评论 -
Ehcache 集成 shiro 后再集成spring cache后出现 CacheManager 冲突???
由于之前通过在shiro中集成 Ehcache 实现 对session 进行缓存,但是在今天在使用Ehcache 集成 spring cache 中遇到了一个问题,出现以下异常信息: net.sf.ehcache.CacheException: Another unnamed CacheManager already exists in the same VM. Please provide un...原创 2019-03-27 17:27:50 · 2283 阅读 · 0 评论