![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring
Himly_Zhang
这个作者很懒,什么都没留下…
展开
-
springboot,springmvc 使用junit单元测试
springboot,springmvc使用Junit单元测试 常见开发过程中在spring相关的框架里面,我们声明类的时候都是使用spring的依赖注入,新接触的童鞋不可能有这个疑惑,当我要链接数据库或使用方法进行测试的时候,在不启动的情况下,是无法注入jdbc,mapper,service的。其实junit单元测试给我们很好的解决了这个问题。对于对这块不了解的。下面简单说明一下。 1、首先pom.xml引入单元测试Junit包 <dependency>原创 2020-06-12 14:36:08 · 678 阅读 · 0 评论 -
Spring+Quartz 定时任务无法自动注入bean的问题
在applicationcontext.xml中配置了Quartz 用来管理代码中的定时任务……但是问题出现了,serverce和dao均无法注入: xml中配置方法 最后的解决办法 @Service("autoService") public class AutoAuditService implements Job原创 2017-03-01 17:33:03 · 1441 阅读 · 0 评论 -
Spring-session+mongodb实现session共享
Spring-session+mongodb实现session共享pom.xml配置web.xml配置applicationContext.xml 核心配置文件在系统中使用session pom.xml配置 首先需要引入依赖包,直接在pom.xml中添加以下代码即可。 &lt;!-- spring-session整合mongodb --&gt; &lt;dependency&gt; ...原创 2018-10-30 15:52:57 · 1947 阅读 · 0 评论