`
xiaofengxbf
  • 浏览: 18336 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论
文章列表
HibernateTemplate在spring xml bean的编写:   <bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate"> <property name="sessionFactory" ref="sessionFactory"></property> </bean>     在Hib ...
  @Transactional事物注解方式(可以标注于类和方法之前)   使用的条件及需要注意的事项: 1.使用必须是java5或者以上; 2.@Transactional都是用在public修饰的可见类或者方法上面,如果在  private,protected  上使用的话,不会报错 ...
Java unchecked 和 checkded Exception的区别:   Exception的介绍:         其实任何的异常都是Throwable类,并且在它之下包含两个字类Error / Exception。   Unchecked Exception.:包括 Error与RuntimeException. 这类异常都是RuntimeException的子类。 Checke
检查到网站mysql报错,错误内容为: Lock wait timeout exceeded; try restarting transaction, 从网上资料查看,是数据库中innodB类型的表,在执行事务的时候出现了超时,所以导致该错误的出现,解决方法的话就是:     修改my.cnf或者my.ini配置文件中的相应选项中 innodb_lock_wait_timeout 的时间秒数,默认是50s,最低可以是1s,如果将这个值设定为100000000以上的话,将禁用超时(无论等待多久都不会返回超时错误).   我的是修改了   : my.cnf 暂时设置为:500s , ...
Spring不但支持自己定义的@Autowired注解,还支持由JSR-250规范定义的几个注解,如:@Resource、 @PostConstruct    及@PreDestroy。   1. @Autowired     @Autowired是Spring 提供的,需导入     Package:org.springframework.beans.factory.annotation.Autowired;     只按照byType 注入。 2. @Resource     @Resource默认按 byName 自动注入,是J2EE提供的, 需导入Package:     ...
<aop:config> <aop:pointcut id="userDAO" expression="execution(public * ssh.dao.UserDAO.*(..))" /> <aop:advisor advice-ref="tx" pointcut-ref="userDAO"/> </aop:config>   execution                     是方法运行 ...
web.xml 整个配置,用于整合ssh框架   <?xml version="1.0" encoding="UTF-8"?><web-app version="2.5"     xmlns="http://java.sun.com/xml/ns/javaee"     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xsi:schemaLo ...
Global site tag (gtag.js) - Google Analytics