报错:
org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.MANUAL):
dao代码:
public void save(LessModel lm) {
this.getHibernateTemplate().save(lm);
}
解决办法:
上述代码修改为
public void save(LessModel lm) {
this.getHibernateTemplate().setFlushMode(2);
this.getHibernateTemplate().save(lm);
}