From 5a5fdaa9ae26b9dc453e5f0bd16724921735c0ce Mon Sep 17 00:00:00 2001 From: wu Date: Thu, 20 Jun 2024 14:34:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/pom.xml | 2 +- .../main/java/com/ruoyi/RuoYiApplication.java | 12 ++-- .../main/resources/application-internet.yml | 58 +++++++++++++++++-- .../src/main/resources/application.yml | 2 +- 4 files changed, 60 insertions(+), 14 deletions(-) diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index a1e5ce4..1e19376 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -9,7 +9,7 @@ 4.0.0 jar - ruoyi-admin + bms web服务入口 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java index cdb2601..f0fb767 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java @@ -11,17 +11,15 @@ import java.net.UnknownHostException; /** * 启动程序 - * + * * @author ruoyi */ -@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) -public class RuoYiApplication -{ - public static void main(String[] args) - { +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) +public class RuoYiApplication { + public static void main(String[] args) { ConfigurableApplicationContext application = SpringApplication.run(RuoYiApplication.class, args); Environment env = application.getEnvironment(); - String ip = null; + String ip; try { ip = InetAddress.getLocalHost().getHostAddress(); } catch (UnknownHostException e) { diff --git a/ruoyi-admin/src/main/resources/application-internet.yml b/ruoyi-admin/src/main/resources/application-internet.yml index 6152412..dbc1f17 100644 --- a/ruoyi-admin/src/main/resources/application-internet.yml +++ b/ruoyi-admin/src/main/resources/application-internet.yml @@ -1,3 +1,31 @@ +# 项目相关配置 +ruoyi: + # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) + profile: /home/ruoyi/uploadPath + +# 正式环境配置 +server: + # 服务器的HTTP端口,默认为8080 + port: 8910 + servlet: + # 应用的访问路径 + context-path: / + tomcat: + # tomcat的URI编码 + uri-encoding: UTF-8 + # 连接数满后的排队数,默认为100 + accept-count: 1000 + threads: + # tomcat最大线程数,默认为200 + max: 800 + # Tomcat启动初始化的线程数,默认值10 + min-spare: 100 + +# 日志配置 +logging: + level: + com.ruoyi: error + org.springframework: error # 数据源配置 spring: datasource: @@ -6,11 +34,9 @@ spring: druid: # 主库数据源 master: -# url: jdbc:mysql://localhost:3306/jingji_hu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - url: jdbc:mysql://39.101.188.84:3307/jingji_hu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + url: jdbc:mysql://192.114.0.247:3306/jinji_hu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root -# password: root - password: Admin123@ + password: Cloud@1234 # 从库数据源 slave: # 从数据源开关/默认关闭 @@ -61,6 +87,28 @@ spring: wall: config: multi-statement-allow: true + # redis 配置 + redis: + # 地址 + host: 192.114.0.247 + # 端口,默认为6379 + port: 6379 + # 数据库索引 + database: 0 + # 密码 + password: Cloud@1234 + # 连接超时时间 + timeout: 10s + lettuce: + pool: + # 连接池中的最小空闲连接 + min-idle: 0 + # 连接池中的最大空闲连接 + max-idle: 8 + # 连接池的最大数据库连接数 + max-active: 8 + # #连接池最大阻塞等待时间(使用负值表示没有限制) + max-wait: -1ms #自己客户端地址 -returnUrl: http://39.101.188.84:9999/demo/JinJiHu +returnUrl: https://idp.sipac.gov.cn/bms/JinJiHu #returnUrl: http://192.168.0.105:80/ \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 1015f09..8275ab2 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -52,7 +52,7 @@ spring: # 国际化资源文件路径 basename: i18n/messages profiles: - active: druid + active: internet # 文件上传 servlet: multipart: