zhaoawd
11/26/2018 - 2:01 AM

解决mybatis不自动报错的问题

解决mybatis不自动报错的问题

public class FixedSqlSessionFactory extends SqlSessionFactoryBean {
    @Override
    protected SqlSessionFactory buildSqlSessionFactory() throws IOException {
        try {
            return super.buildSqlSessionFactory();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            ErrorContext.instance().reset();
        }
        return null;
    }
}