摘要: 因为spring的context是父子容器,所以会产生冲突,由ServletContextListener产生的是父容器,springMVC产生的是子容器,子容器Controller进行扫描装配时装配了@Service注解的实例,而该实例理应由父容器进行初始化以保证事务的增强处理,所以此时得到的将是 阅读全文
posted @ 2018-10-28 12:32 圣金巫灵 阅读(87) 评论(0) 推荐(0) 编辑
摘要: Writer out = new StringWriter(); PrintWriter s = new PrintWriter(out); // 创建不带自动行刷新的新 PrintWriter。 exception.printStackTrace(s); //将异常信息放入out中 msg = o 阅读全文
posted @ 2018-10-28 12:01 圣金巫灵 阅读(372) 评论(0) 推荐(0) 编辑
摘要: 转自https://www.cnblogs.com/sky230/p/5759831.html Log4j是帮助开发人员进行日志输出管理的API类库。它最重要的特点就可以配置文件灵活的设置日志信息的优先级、日志信息的输出目的地以及日志信息的输出格式。Log4j除了可以记录程序运行日志信息外还有一重要 阅读全文
posted @ 2018-10-28 03:44 圣金巫灵 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 转http://www.baeldung.com/spring-nosuchbeandefinitionexception 1. Overview In this article, we are discussing the Springorg.springframework.beans.facto 阅读全文
posted @ 2018-10-28 03:40 圣金巫灵 阅读(200) 评论(0) 推荐(0) 编辑