applicationContext.xml
|
1 2 3 4 5 6 |
<property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> <prop key="hibernate.show_sql">true</prop> </props> </property> |
…
applicationContext.xml
|
1 2 3 4 5 6 |
<property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> <prop key="hibernate.show_sql">true</prop> </props> </property> |
…
http://blog.sina.com.cn/s/blog_72b4c81f0100rjy8.html 1….
http://blog.163.com/xiaokangzhijia@126/blog/static/1659…
MyEclipse、Struts2.1、Spring3.0、Hibernate3.3框架整合详细图解: 下载:…
通过注解注入方式 1. 在applicationContext.xml定义 [crayon-6abfba2f5…
1. Action实现implements ServletRequestAware,并实现setServlet…
http://blog.csdn.net/fdgaq/archive/2010/05/03/5552561.a…
1. spring.jar 是包含有完整发布模块的单个jar 包。这个在~3.03之后不再提供!想要该包的同学…
http://www.mkyong.com/spring/spring-jdbctemplate-jdbcda…
在网上找到的,简洁实用。 http://blog.csdn.net/trwhoya/archive/2009/…
applicationContext.xml
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> <property name="driverClass" value="com.mysql.jdbc.Driver"/> <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/asl_daily_report" /> <property name="user" value="root" /> <property name="password" value="" /> <property name="maxPoolSize" value="40"/> <property name="minPoolSize" value="1"/> <property name="initialPoolSize" value="1"/> <property name="maxIdleTime" value="20"/> </bean> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="dataSource"/> </bean> <bean id="newsDao" class="org.crazyit.app.dao.impl.NewsDaoImpl"> <property name="ds" ref="dataSource"/> </bean> <bean id="newsDaoTrans" class= "org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> <property name="transactionManager" ref="transactionManager"/> <property name="target" ref="newsDao"/> <property name="transactionAttributes"> <props> <prop key="*">PROPAGATION_REQUIRED,-DataAccessException</prop> </props> </property> </bean> |
…
http://san-yun.iteye.com/blog/494405 “事务隔离级别(transactio…
1. 今天看了怎么弄AOP,跟着别人写了半天,是在自己一些代码上写的。好不容写完了,但运行一下,咋后台什么东西…
下面四个标注用来定义 bean, 自动根据 bean 的类名生成一个首字母小写的 bean [crayon-6…
参考零配置及惯例代替配置:http://www.blogjava.net/easyjf/archive/200…
MyTestInstance类
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
package com.app.impl; public class MyTestInstance { private String testMessage; public MyTestInstance(){ System.out.println("初始化我的MyTestInstance类."); } public void info(){ System.out.println(this.getTestMessage()); } public String getTestMessage() { return testMessage; } public void setTestMessage(String testMessage) { this.testMessage = testMessage; } } |
TestCr…