Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gjjs-bd-common
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
s_guodong
gjjs-bd-common
Commits
8e3d76d0
Commit
8e3d76d0
authored
Jun 15, 2023
by
s_guodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改数据库配置
parent
1da7771f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
299 deletions
+14
-299
application-oracle.yml
gjjs-bd-business/src/main/resources/application-oracle.yml
+7
-224
DataSourceConfiguration.java
...illiance/mda/support/mybatis/DataSourceConfiguration.java
+7
-75
No files found.
gjjs-bd-business/src/main/resources/application-oracle.yml
View file @
8e3d76d0
This diff is collapsed.
Click to expand it.
gjjs-bd-mybatis-support/src/main/java/com/brilliance/mda/support/mybatis/DataSourceConfiguration.java
View file @
8e3d76d0
...
...
@@ -20,76 +20,14 @@ import java.util.HashMap;
@Configuration
@EnableAutoConfiguration
(
exclude
=
{
DataSourceAutoConfiguration
.
class
})
public
class
DataSourceConfiguration
{
/**
* 数据源1
*/
@Bean
(
name
=
"datasource1"
)
@Qualifier
(
"datasource1"
)
@ConfigurationProperties
(
prefix
=
"spring.datasource1"
)
public
DruidDataSource
datasource1
()
{
return
new
DruidDataSource
();
}
/**
* 数据源2
*/
@Bean
(
name
=
"datasource2"
)
@Qualifier
(
"datasource2"
)
@ConfigurationProperties
(
prefix
=
"spring.datasource2"
)
public
DruidDataSource
datasource2
()
{
return
new
DruidDataSource
();
}
/**
* 数据源eibs
*/
@Bean
(
name
=
"eibs"
)
@Qualifier
(
"eibs"
)
@ConfigurationProperties
(
prefix
=
"spring.eibs"
)
public
DruidDataSource
eibs
()
{
return
new
DruidDataSource
();
}
/**
* 数据源swd
*/
@Bean
(
name
=
"swd"
)
@Qualifier
(
"swd"
)
@ConfigurationProperties
(
prefix
=
"spring.swd"
)
public
DruidDataSource
swd
()
{
return
new
DruidDataSource
();
}
/**
* 数据源fxd
*/
@Bean
(
name
=
"fxd"
)
@Qualifier
(
"fxd"
)
@ConfigurationProperties
(
prefix
=
"spring.fxd"
)
public
DruidDataSource
fxd
()
{
return
new
DruidDataSource
();
}
/**
* 数据源erd
*/
@Bean
(
name
=
"erd"
)
@Qualifier
(
"erd"
)
@ConfigurationProperties
(
prefix
=
"spring.erd"
)
public
DruidDataSource
erd
()
{
return
new
DruidDataSource
();
}
/**
* 数据源
ryd
* 数据源
ipsnew
*/
@Bean
(
name
=
"
ryd
"
)
@Qualifier
(
"
ryd
"
)
@ConfigurationProperties
(
prefix
=
"spring.
ryd
"
)
public
DruidDataSource
ryd
()
{
@Bean
(
name
=
"
ipsnew
"
)
@Qualifier
(
"
ipsnew
"
)
@ConfigurationProperties
(
prefix
=
"spring.
ipsnew
"
)
public
DruidDataSource
ipsnew
()
{
return
new
DruidDataSource
();
}
...
...
@@ -99,15 +37,9 @@ public class DataSourceConfiguration {
public
DataSource
dynamicDataSource
()
{
DynamicDataSource
dynamicDataSource
=
new
DynamicDataSource
();
dynamicDataSource
.
myMap
=
new
HashMap
<>();
dynamicDataSource
.
myMap
.
put
(
"datasource1"
,
datasource1
());
dynamicDataSource
.
myMap
.
put
(
"datasource2"
,
datasource2
());
dynamicDataSource
.
myMap
.
put
(
"eibs"
,
eibs
());
dynamicDataSource
.
myMap
.
put
(
"swd"
,
swd
());
dynamicDataSource
.
myMap
.
put
(
"fxd"
,
fxd
());
dynamicDataSource
.
myMap
.
put
(
"erd"
,
erd
());
dynamicDataSource
.
myMap
.
put
(
"ryd"
,
ryd
());
dynamicDataSource
.
myMap
.
put
(
"ipsnew"
,
ipsnew
());
dynamicDataSource
.
setTargetDataSources
(
dynamicDataSource
.
myMap
);
dynamicDataSource
.
setDefaultTargetDataSource
(
eibs
());
dynamicDataSource
.
setDefaultTargetDataSource
(
ipsnew
());
DynamicDataSourceContextHolder
.
dataSourceIds
.
addAll
(
dynamicDataSource
.
myMap
.
keySet
());
return
dynamicDataSource
;
}
...
...
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