
spring
Adeline__-_-
这个作者很懒,什么都没留下…
展开
-
DI的注入方式
DI注入1.构造方法注入在xml文件中配置1.1<constructor-arg />表示法<bean id="person" class="com.yc.bean.Person"><constructor-arg type="String" value="bobo" /><constructor-arg t原创 2018-07-29 11:35:39 · 1714 阅读 · 0 评论 -
spring项目基本的xml配置
1.加入jar包 <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> </dependency&...原创 2018-07-26 18:47:11 · 357 阅读 · 0 评论 -
SpringMVC+mybatis+spring框架的基本配置
SpringMVC+mybatis+spring框架的基本配置 1.配置web.xml <servlet><servlet-name>springmvc</servlet-name><!-- 前端控制器 --><servlet-class>org.springframework.web.servlet.Dispa...原创 2018-08-04 11:31:09 · 222 阅读 · 0 评论 -
spring 报错:Error creating bean with name 'dataSource' defined in class path resource [bean.xml] Cause
Error creating bean with name 'dataSource' defined in class path resource [bean.xml]Caused by: java.lang.IllegalArgumentException: warning no match for this type name: com.yc.biz.impl [Xlint:inva...原创 2018-07-31 14:53:31 · 2011 阅读 · 0 评论 -
springmvc报错:java.lang.NoSuchMethodError: org.springframework.context.support.AbstractApplicationCont
java.lang.NoSuchMethodError: org.springframework.context.support.AbstractApplicationContext.clearResourceCaches()V at org.springframework.context.support.AbstractApplicationContext.finishRefresh(Abstr...原创 2018-07-31 14:55:09 · 3178 阅读 · 2 评论 -
springmvc报错:cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'mvc:annotation-driven'. 解决:头的引入顺序混乱将http://www.springframework.org/schema/tx的位置移动到...原创 2018-07-31 15:01:28 · 1142 阅读 · 0 评论 -
spring的简单前置增强
1.1.1在xml中开启aspectj的功能的支持。 <aop:aspectj-autoproxy/> 启用aspectj支持1.2在.xml文件中配置 扫描包的<context:component-scan base- package="com.yc.aop_xml_annotation" />2 声明切面 : 在切面的对象中加入 @...原创 2018-08-29 08:44:53 · 1006 阅读 · 0 评论