
Spring
乐邦666
Be thankful for what you have. Your life, no matter how bad you think it is, is someone else's fairy tale
展开
-
Spring声明式事务配置异常时回滚的问题
问题:spring 声明式事务,不能回滚多个操作的事务 原因:在service方法里面加了 try{} catch(){}, 解决:要把try catch放到action里面 [code="java"] //Controller @Controller @RequestMapping("/versionLable") public class D...原创 2012-05-09 20:49:36 · 472 阅读 · 0 评论 -
如何在系统启动时能够调用spring的注解@Service方法
系统中有一个TimerTask,需要在系统启动时就执行,而该TimerTask中要用到一些Service(Service中还用到了Dao),系统是采用spring的注解的,如@Controller @Service @Repository等。 在web.xml中配置 [code="xml"] smcInitServlet com.xxx.common.util.InitServ...2013-05-28 16:52:23 · 335 阅读 · 0 评论 -
spring+hibernate中Connection is read-only问题的产生原因与解决方法
报错:org.hibernate.exception.GenericJDBCException: Connection is read-only. Queries leading to data modification are not allowed 原因: spring-config.xml文件 [code="xml"] ...2013-05-31 21:29:45 · 421 阅读 · 0 评论