Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yichengstreet-be
Project
Project
Details
Activity
Releases
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
yichengstreet
yichengstreet-be
Commits
cb252096
Commit
cb252096
authored
Feb 19, 2025
by
lixuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev
parent
32b5b8eb
Pipeline
#142771
passed with stages
in 4 minutes and 1 second
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
10 deletions
+18
-10
RuoYiApplication.java
ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
+11
-3
application-dev.yml
ruoyi-admin/src/main/resources/application-dev.yml
+4
-4
application-prod.yml
ruoyi-admin/src/main/resources/application-prod.yml
+3
-3
No files found.
ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
View file @
cb252096
...
@@ -3,10 +3,16 @@ package com.ruoyi;
...
@@ -3,10 +3,16 @@ package com.ruoyi;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.jdbc.datasource.DataSourceUtils
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
javax.sql.DataSource
;
import
java.sql.Connection
;
import
java.sql.SQLException
;
/**
/**
* 启动程序
* 启动程序
*
*
...
@@ -18,10 +24,12 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
...
@@ -18,10 +24,12 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@EnableAsync
@EnableAsync
public
class
RuoYiApplication
public
class
RuoYiApplication
{
{
public
static
void
main
(
String
[]
args
)
public
static
void
main
(
String
[]
args
)
throws
SQLException
{
{
// System.setProperty("spring.devtools.restart.enabled", "false");
// System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication
.
run
(
RuoYiApplication
.
class
,
args
);
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
RuoYiApplication
.
class
,
args
);
DataSource
dataSource
=
context
.
getBean
(
DataSource
.
class
);
Connection
connection
=
DataSourceUtils
.
getConnection
(
dataSource
);
System
.
out
.
println
(
"connection.getMetaData().getURL() = "
+
connection
.
getMetaData
().
getURL
());
System
.
out
.
println
(
"(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n"
+
System
.
out
.
println
(
"(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n"
+
" .-------. ____ __ \n"
+
" .-------. ____ __ \n"
+
" | _ _ \\ \\ \\ / / \n"
+
" | _ _ \\ \\ \\ / / \n"
+
...
...
ruoyi-admin/src/main/resources/application-dev.yml
View file @
cb252096
...
@@ -97,16 +97,16 @@ spring:
...
@@ -97,16 +97,16 @@ spring:
druid
:
druid
:
# 主库数据源
# 主库数据源
master
:
master
:
url
:
jdbc:mysql://192.168.
31.145:3306/wst-be
?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
url
:
jdbc:mysql://192.168.
70.2:3306/yichengstreet
?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
username
:
root
username
:
root
password
:
P@44w0rd
password
:
Zhuo@2023
# 从库数据源
# 从库数据源
slave
:
slave
:
# 从数据源开关/默认关闭
# 从数据源开关/默认关闭
enabled
:
true
enabled
:
true
url
:
jdbc:mysql://192.168.
31.145:3306/wst-be
-party?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
url
:
jdbc:mysql://192.168.
70.2:3306/yichengstreet
-party?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
username
:
root
username
:
root
password
:
P@44w0rd
password
:
Zhuo@2023
# 初始连接数
# 初始连接数
initialSize
:
5
initialSize
:
5
# 最小连接池数量
# 最小连接池数量
...
...
ruoyi-admin/src/main/resources/application-prod.yml
View file @
cb252096
...
@@ -102,9 +102,9 @@ spring:
...
@@ -102,9 +102,9 @@ spring:
slave
:
slave
:
# 从数据源开关/默认关闭
# 从数据源开关/默认关闭
enabled
:
true
enabled
:
true
url
:
jdbc:mysql://1
0.36.21.12:3306/wst-be
-party?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
url
:
jdbc:mysql://1
92.168.70.2:3306/yichengstreet
-party?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
username
:
wst
root
username
:
root
password
:
Vp7xdDaxRsAbk
password
:
Zhuo@2023
# 初始连接数
# 初始连接数
initialSize
:
5
initialSize
:
5
# 最小连接池数量
# 最小连接池数量
...
...
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