Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zh-mes-device-data-process
Project
Project
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
耿迪迪
zh-mes-device-data-process
Commits
4796ab44
Commit
4796ab44
authored
May 21, 2025
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
多数据源
parent
4b08e119
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
pom.xml
pom.xml
+6
-0
application-test.yml
src/main/resources/application-test.yml
+14
-4
No files found.
pom.xml
View file @
4796ab44
...
@@ -46,6 +46,12 @@
...
@@ -46,6 +46,12 @@
<version>
3.4.3.4
</version>
<version>
3.4.3.4
</version>
</dependency>
</dependency>
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
dynamic-datasource-spring-boot-starter
</artifactId>
<version>
3.4.1
</version>
</dependency>
<!-- 其他可能需要的依赖 -->
<!-- 其他可能需要的依赖 -->
<dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<groupId>
org.projectlombok
</groupId>
...
...
src/main/resources/application-test.yml
View file @
4796ab44
#mysql
#mysql
spring
:
spring
:
datasource
:
datasource
:
username
:
zh-mes-device-db
dynamic
:
password
:
KJThfp2x85YMmGAw
primary
:
device
#设置默认的数据源或者数据源组,默认值即为master
url
:
jdbc:mysql://36.138.180.82:3309/zh-mes-device-db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
strict
:
false
#设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候会抛出异常,不启动则使用默认数据源.
driver-class-name
:
com.mysql.jdbc.Driver
datasource
:
\ No newline at end of file
device
:
driver-class-name
:
com.mysql.jdbc.Driver
url
:
jdbc:mysql://36.138.180.82:3309/zh-mes-device-db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username
:
zh-mes-device-db
password
:
KJThfp2x85YMmGAw
mes
:
driver-class-name
:
com.mysql.jdbc.Driver
url
:
jdbc:mysql://36.138.180.82:3309/zh_mes_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
username
:
zh_mes_db
password
:
Dba5CdmBm3tdJ4ph
\ No newline at end of file
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