Spring MVC之@RequestMapping 详解 Spring MVC之@RequestMapping 详解 2013-10-13 23:39 246622人阅读 评论(19) 收藏 举报 2013-10-13 23:39 246622人阅读 评论(19) 收藏 举报 分类: Java 精 ...
分类:
编程语言 时间:
2017-08-20 10:10:19
阅读次数:
116
1.添加xsd约束 @Component("info") 不分层@Repository("info") dao@Service("info") biz@Controller("info") action @Value() 在一个类中注入普通属性值 @Resource 在一个类中注入域属性 @Auto ...
分类:
编程语言 时间:
2017-08-20 10:08:06
阅读次数:
141
需要junit和spring-test-versionjar包@RunWith(SpringJUnit4ClassRunner.class)@ContextConfiguration(locations="classpath:applicationContext*.xml")如普通spring注解注解使用就可以了例子@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations="classp..
分类:
编程语言 时间:
2017-08-13 23:25:48
阅读次数:
215
继前几章所讲解的注解中: http://www.cnblogs.com/EasonJim/p/6892280.html http://www.cnblogs.com/EasonJim/p/6899747.html http://www.cnblogs.com/EasonJim/p/6901115.h ...
分类:
编程语言 时间:
2017-08-11 19:29:24
阅读次数:
261
需要引进相关的jar包 spring-aop-3.2.5.RELEASE.jar aopalliance.jar aspectjweaver.jar ...
分类:
编程语言 时间:
2017-08-09 13:05:54
阅读次数:
113
一、使用注解前,在配置文件中,引入context命名空间xmlns:context=http://www.springframework.org/schema/context
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springfr..
分类:
编程语言 时间:
2017-08-08 19:37:37
阅读次数:
238
需要加载的配置文件内容(resource.properties): 实现在applicationContext.xml中需要配置加载的配置文件: 然后使用注解方式获取配置文件中的信息: 这样既可以使用配置文件中的字段了。 ...
分类:
编程语言 时间:
2017-08-08 00:25:44
阅读次数:
210
Spring注解@Component、@Repository、@Service、@Controller区别 spring 2.5 中除了提供 @Component 注释外,还定义了几个拥有特殊语义的注释,它们分别是:@Repository、@Service 和 @Controller。在目前的 Sp ...
分类:
编程语言 时间:
2017-08-07 11:56:22
阅读次数:
183
原网址:http://www.cnblogs.com/leskang/p/5445698.html 一、@Controller(标准一个普通的spring Bean类) 在SpringMVC 中,控制器Controller 负责处理由DispatcherServlet 分发的请求,它把用户请求的数据 ...
分类:
编程语言 时间:
2017-07-29 16:30:07
阅读次数:
194
概述 事务管理对于企业应用来说是至关重要的,即使出现异常情况,它也可以保证数据的一致性。Spring Framework对事务管理提供了一致的抽象,其特点如下: 为不同的事务API提供一致的编程模型,比如JTA(Java Transaction API), JDBC, Hibernate, JPA( ...
分类:
编程语言 时间:
2017-07-26 22:05:50
阅读次数:
187