1.HTTP Status 500 - Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove ‘readOnly’ marker from transaction definition.
getHibernateTemplate().execute()改为 getHibernateTemplate().execute(new HibernateCallback<T>() { @Override public T doInHibernate(Session arg) throws HibernateException { session.save(t); return null; } });2.org.hibernate.engine.jdbc.spi.SqlExceptionHelper - Table ‘XXX’ doesn’t exist
Hibernate-5注意两个版本Dialect <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> <property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>