use of cn.taketoday.context.support.SimpleThreadScope in project today-infrastructure by TAKETODAY.
the class MapperScanTest method setupContext.
@BeforeEach
void setupContext() {
applicationContext = new AnnotationConfigApplicationContext();
applicationContext.getBeanFactory().registerScope("thread", new SimpleThreadScope());
setupSqlSessionFactory();
// assume support for autowiring fields is added by MapperScannerConfigurer
// via
// cn.taketoday.context.annotation.ClassPathBeanDefinitionScanner.includeAnnotationConfig
}
use of cn.taketoday.context.support.SimpleThreadScope in project today-infrastructure by TAKETODAY.
the class MapperScannerConfigurerTest method setupContext.
@BeforeEach
void setupContext() {
applicationContext = new GenericApplicationContext();
// add the mapper scanner as a bean definition rather than explicitly setting a
// postProcessor on the context so initialization follows the same code path as reading from
// an XML config file
GenericBeanDefinition definition = new GenericBeanDefinition();
definition.setBeanClass(MapperScannerConfigurer.class);
definition.getPropertyValues().add("basePackage", "cn.taketoday.orm.mybatis.mapper");
applicationContext.registerBeanDefinition("mapperScanner", definition);
applicationContext.getBeanFactory().registerScope("thread", new SimpleThreadScope());
setupSqlSessionFactory("sqlSessionFactory");
// assume support for autowiring fields is added by MapperScannerConfigurer via
// cn.taketoday.context.annotation.ClassPathBeanDefinitionScanner.includeAnnotationConfig
}
use of cn.taketoday.context.support.SimpleThreadScope in project today-framework by TAKETODAY.
the class MapperScannerConfigurerTest method setupContext.
@BeforeEach
void setupContext() {
applicationContext = new GenericApplicationContext();
// add the mapper scanner as a bean definition rather than explicitly setting a
// postProcessor on the context so initialization follows the same code path as reading from
// an XML config file
GenericBeanDefinition definition = new GenericBeanDefinition();
definition.setBeanClass(MapperScannerConfigurer.class);
definition.getPropertyValues().add("basePackage", "cn.taketoday.orm.mybatis.mapper");
applicationContext.registerBeanDefinition("mapperScanner", definition);
applicationContext.getBeanFactory().registerScope("thread", new SimpleThreadScope());
setupSqlSessionFactory("sqlSessionFactory");
// assume support for autowiring fields is added by MapperScannerConfigurer via
// cn.taketoday.context.annotation.ClassPathBeanDefinitionScanner.includeAnnotationConfig
}
use of cn.taketoday.context.support.SimpleThreadScope in project today-framework by TAKETODAY.
the class MapperScanTest method setupContext.
@BeforeEach
void setupContext() {
applicationContext = new AnnotationConfigApplicationContext();
applicationContext.getBeanFactory().registerScope("thread", new SimpleThreadScope());
setupSqlSessionFactory();
// assume support for autowiring fields is added by MapperScannerConfigurer
// via
// cn.taketoday.context.annotation.ClassPathBeanDefinitionScanner.includeAnnotationConfig
}
Aggregations