Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot coexist #29

Closed
StateGrace opened this issue Mar 11, 2016 · 1 comment
Closed

Cannot coexist #29

StateGrace opened this issue Mar 11, 2016 · 1 comment
Labels

Comments

@StateGrace
Copy link

@bean
@ConditionalOnMissingBean
public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception {
SqlSessionFactoryBean factory = new SqlSessionFactoryBean();
factory.setDataSource(dataSource);
if (StringUtils.hasText(this.properties.getConfig())) {
factory.setConfigLocation(
this.resourceLoader.getResource(this.properties.getConfig()));
}
if (StringUtils.hasText(this.properties.getTypeAliasesPackage()))
factory.setTypeAliasesPackage(this.properties.getTypeAliasesPackage());
if (StringUtils.hasText(this.properties.getTypeHandlersPackage()))
factory.setTypeHandlersPackage(this.properties.getTypeHandlersPackage());
if (this.properties.getMapperLocations()!=null && this.properties.getMapperLocations().length>0)
factory.setMapperLocations(this.properties.getMapperLocations());
return factory.getObject();
}

@emacarron
Copy link
Member

Sorry we need some text to understand the issue. Please as for a reopen if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants