It looks like (1) can be achieved along the lines of:
@Bean
public SqlSessionFactory sqlSessionFactory() throws Exception
{
SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
sessionFactory.setMapperLocations(new Resource[]{resource1, resource2});
sessionFactory.setDataSource(getDataSource());
return sessionFactory.getObject();
}
In terms of (2), it seems like this is a much-wanted but unavailable feature in Mybatis. One work-around however is to completely re-create the SqlSession and replace the old one - this effectively picks up any changes made to XML Mappers.
SqlSession sqlSession = applicationConfiguration.createSqlSessionFactory().openSession();
sqlSession.selectList(...)
Hope this helps someone.