Spring JdbcTemplate方法详细介绍。 JdbcTemplate主要提供以下五类方法:
- execute方法:可以用于执行任何SQL语句,一般用于执行DDL语句;
- update方法及batchUpdate方法:update方法用于执行新增、修改、删除等语句;batchUpda[......]
Spring JdbcTemplate方法详细介绍。 JdbcTemplate主要提供以下五类方法:
如何使用spring的作用域:
<bean id=”role” class=”spring.chapter2.maryGame.Role” scope=”singleton”/>
这里的scope[......]
Spring框架的核心功能IoC(Inversion of Control),也就是通过Spring容器进行对象的管理,以及对象之间组合关系的映射。通常情况下我们会在xml配置文件中进行action,service,dao等层的声明,然后并告知框架我们想要的注入方式,然后在类中声明要组合类的get,[......]
spring开发Annotation注解介绍。
项目结构:
http://www.cnblogs.com/hongten/gallery/image/112614.html
/spring_1800_Annotation/src/com/b510/app/test/SpringTest.[......]
Spring Annotation 详解。
(1) 、<context:component-scan base-package=”*.*” />
该配置隐式注册了多个对注解进行解析的处理器,如:
AutowiredAnnotationBeanPostProcessor
Co[......]
Spring管理Hibernate事务配置。
1、TransactionProxyFactoryBean
复制代码
<?xml version=”1.0″ encoding=”UTF-8″?>
<beans xmlns=”http://www.springframewo[......]
如何让spring管理hibernate事务机制(annotation)
第一步:在beans.xml中配置:
<bean id=”txManager”>
<property name=”sessionFactory” ref=”sessionFa[......]