<dataSource type="UNPOOLED">
<property name="driver" value="${driver}" />
<property name="url" value="${url}" />
<property name="username" value="${username}" />
<property name="password" value="${password}" />
</dataSource>
Properties properties = new Properties();
properties.setProperty("driver", Driver.class.getName());
properties.setProperty("url", "jdbc:postgresql://localhost/root");
properties.setProperty("username", "login");
properties.setProperty("password", "password");
Reader rdr = Resources.getResourceAsReader("com/suppx/resources/configuration.xml");
sessionFactory = new SqlSessionFactoryBuilder().build(rdr, properties);
configure.xml
в java-коде