Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xzxt-api-report
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
雷紫添
xzxt-api-report
Commits
d86779fa
Commit
d86779fa
authored
Sep 08, 2022
by
wang_jiaxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
身份核查接口返回值修改
parent
272ae0b4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
41 deletions
+0
-41
src/main/java/com/founder/config/DataSourceXzxtMysqlConfig.java
+0
-41
No files found.
src/main/java/com/founder/config/DataSourceXzxtMysqlConfig.java
deleted
100644 → 0
View file @
272ae0b4
package
com
.
founder
.
config
;
import
org.apache.ibatis.session.SqlSessionFactory
;
import
org.mybatis.spring.SqlSessionFactoryBean
;
import
org.mybatis.spring.SqlSessionTemplate
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.jdbc.DataSourceBuilder
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.io.support.PathMatchingResourcePatternResolver
;
import
javax.sql.DataSource
;
/**
* Created by summer on 2016/11/25.
*/
@Configuration
@MapperScan
(
basePackages
=
"com.founder.*.mysqldao"
,
sqlSessionTemplateRef
=
"xzxtMysqlSqlSessionTemplate"
)
public
class
DataSourceXzxtMysqlConfig
{
@Bean
(
name
=
"xzxtMysqlDataSource"
)
@ConfigurationProperties
(
prefix
=
"spring.datasource.mysql"
)
public
DataSource
xzxtMysqlDataSource
()
{
return
DataSourceBuilder
.
create
().
build
();
}
@Bean
(
name
=
"xzxtMysqlSqlSessionFactory"
)
public
SqlSessionFactory
xzxtMysqlSqlSessionFactory
(
@Qualifier
(
"xzxtMysqlDataSource"
)
DataSource
dataSource
)
throws
Exception
{
SqlSessionFactoryBean
bean
=
new
SqlSessionFactoryBean
();
bean
.
setDataSource
(
dataSource
);
bean
.
setMapperLocations
(
new
PathMatchingResourcePatternResolver
().
getResources
(
"classpath:mybatis/mysqlMapper/*.xml"
));
return
bean
.
getObject
();
}
@Bean
(
name
=
"xzxtMysqlSqlSessionTemplate"
)
public
SqlSessionTemplate
xzxtMysqlSqlSessionTemplate
(
@Qualifier
(
"xzxtMysqlSqlSessionFactory"
)
SqlSessionFactory
sqlSessionFactory
)
throws
Exception
{
return
new
SqlSessionTemplate
(
sqlSessionFactory
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment