allora, ho spostato il file mybatis-config.xml in src/main/resources.
e poi ho cambiato così:
ma continuo ad avere quell'errore.codice:public class MyBatisUtils { private static SqlSessionFactory factory; static { String myBatisConfig = "mybatis-config.xml"; Reader reader = null; try { reader = Resources.getResourceAsReader(myBatisConfig); } catch (IOException e) { System.out.println(e.getMessage()); } factory = new SqlSessionFactoryBuilder().build(reader); } public static SqlSessionFactory getSqlSessionFactory() { return factory; } }
non dovrebbe bastare questo??

Rispondi quotando