超级菜鸟学习过程中的小问题 刚开始学SSJ框架不久,研究别人代码的时候发现了@Transactional的标签,搜索了下知道了里面可以设置的相关数据,我现在就想问下如果不在service上用@Transactional的话,service代码(CURD功能)会不会增加?还是说只要在相应的配置文件中进行修改就可以了。如果修改的话该怎么改?望高手不吝赐教! 多谢~! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 还有这个@PersistenceContext不是很清楚其作用,以及可否被代替? 删了@Transactional以后,就是不用注解方式,用xml配置的方式。不用改service代码的,改配置文件就行。<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="dataSource"/></bean><tx:annotation-driven transaction-manager="txManager"/><tx:advice id="txAdvice" transaction-manager="txManager"> <tx:attributes> <tx:method name="*" propagation="REQUIRED" /> <tx:method name="find*" propagation="REQUIRED" read-only="true" /> <tx:method name="load*" propagation="REQUIRED" read-only="true" /> </tx:attributes></tx:advice>xmlns:tx="http://www.springframework.org/schema/tx"xsi:schemaLocation="http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd" SSJ框架是什么东西啊 我是菜鸟 dom4j对xml的增删改查 java 泛型高手 请进? 关于HOTMAIL邮件发送的问题 SSH看看吧,这样的错误大神们遇到过母牛 jdom怎么读N节点. 初学J2EE,问一下J2EE应用服务器JBoss、Tomcat之间的联系。 apache和tomcat的整合意义何在 运行jbuilder+ORACLE需要什么样的电脑配置? 一个小错误 视图里添加了一个image字段后,entityBean的方法就报这个错误,各位老大帮忙 java中的乱码怎么解决啊 中文注释乱码 JAVA一年经验,找工作
<property name="dataSource" ref="dataSource"/>
</bean>
<tx:annotation-driven transaction-manager="txManager"/>
<tx:advice id="txAdvice" transaction-manager="txManager">
<tx:attributes>
<tx:method name="*" propagation="REQUIRED" />
<tx:method name="find*" propagation="REQUIRED" read-only="true" />
<tx:method name="load*" propagation="REQUIRED" read-only="true" />
</tx:attributes>
</tx:advice>xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"