小王 há 1 ano atrás
pai
commit
4862304b77

+ 3 - 1
.gitignore

@@ -1,4 +1,6 @@
 /logs
 /target
-/ptas-ui/node_modules
+/vpp-ui/node_modules
 /.idea/
+/vpp-ui/dist
+/src/main/resources/static

+ 8 - 1
pom.xml

@@ -65,6 +65,13 @@
     </profiles>
 
     <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <!--开启过滤,用指定的参数替换directory下的文件中的参数-->
+                <filtering>true</filtering>
+            </resource>
+        </resources>
         <plugins>
             <plugin>
                 <groupId>org.springframework.boot</groupId>
@@ -187,7 +194,7 @@
                             <resources>
                                 <resource>
                                     <!--因为vue-cli打包的目录在项目的根目录,所以从这里复制-->
-                                    <directory>${project.basedir}/ptas-ui/dist</directory>
+                                    <directory>${project.basedir}/vpp-ui/dist</directory>
                                     <includes>
                                         <include>index.html</include>
                                         <include>robots.txt</include>

+ 4 - 6
src/main/java/com/jiayue/ElfApplication.java

@@ -11,13 +11,11 @@ import org.springframework.cache.annotation.EnableCaching;
  * @author ry
  */
 @EnableCaching
-@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
-public class ElfApplication
-{
-    public static void main(String[] args)
-    {
+@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
+public class ElfApplication {
+    public static void main(String[] args) {
         System.setProperty("spring.devtools.restart.enabled", "false");
         SpringApplication.run(ElfApplication.class, args);
-        System.out.println("(♥◠‿◠)ノ゙  PTAS 启动成功   ლ(´ڡ`ლ)゙");
+        System.out.println("(♥◠‿◠)ノ゙  VPP 启动成功   ლ(´ڡ`ლ)゙");
     }
 }

+ 0 - 3
src/main/resources/application-dev.yml

@@ -7,9 +7,6 @@ spring:
     druid:
       # 主库数据源
       master:
-        #url: jdbc:mysql://192.168.1.205:3306/ptas?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
-        #username: root
-        #password: '!QAZ2root'
         url: jdbc:dm://192.168.1.157:5236 # DM 连接的示例
         username: VPP
         password: 123456789

+ 82 - 81
src/main/resources/application-prod.yml

@@ -1,83 +1,84 @@
 # 数据源配置
 spring:
-    datasource:
-        type: com.alibaba.druid.pool.DruidDataSource
-        driverClassName: com.mysql.cj.jdbc.Driver
-        druid:
-            # 主库数据源
-            master:
-                url: jdbc:mysql://192.168.10.16:3306/ptas-db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
-                username: root
-                password: '!QAZ2root'
-            # 从库数据源
-            slave:
-                # 从数据源开关/默认关闭
-                enabled: false
-                url:
-                username:
-                password:
-            # 初始连接数
-            initialSize: 5
-            # 最小连接池数量
-            minIdle: 10
-            # 最大连接池数量
-            maxActive: 20
-            # 配置获取连接等待超时的时间
-            maxWait: 60000
-            # 配置连接超时时间
-            connectTimeout: 30000
-            # 配置网络超时时间
-            socketTimeout: 60000
-            # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-            timeBetweenEvictionRunsMillis: 60000
-            # 配置一个连接在池中最小生存的时间,单位是毫秒
-            minEvictableIdleTimeMillis: 300000
-            # 配置一个连接在池中最大生存的时间,单位是毫秒
-            maxEvictableIdleTimeMillis: 900000
-            # 配置检测连接是否有效
-            validationQuery: SELECT 1 FROM DUAL
-            testWhileIdle: true
-            testOnBorrow: false
-            testOnReturn: false
-            webStatFilter:
-                enabled: true
-            statViewServlet:
-                enabled: true
-                # 设置白名单,不填则允许所有访问
-                allow:
-                url-pattern: /druid/*
-                # 控制台管理用户名和密码
-                login-username: elf
-                login-password: elf
-            filter:
-                stat:
-                    enabled: true
-                    # 慢SQL记录
-                    log-slow-sql: true
-                    slow-sql-millis: 1000
-                    merge-sql: true
-                wall:
-                    config:
-                        multi-statement-allow: true
-    # redis 配置
-    redis:
-        # 地址
-        host: 49.4.68.219
-        # 端口,默认为6379
-        port: 8963
-        # 数据库索引
-        database: 8
-        # 密码
-        password: jydl*3377
-        # 连接超时时间
-        timeout: 10s
-        lettuce:
-            pool:
-                # 连接池中的最小空闲连接
-                min-idle: 0
-                # 连接池中的最大空闲连接
-                max-idle: 8
-                # 连接池的最大数据库连接数
-                max-active: 8
-                # #连接池最大阻塞等待时间(使用负值表示没有限制)
-                max-wait: -1ms
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    #driverClassName: com.mysql.cj.jdbc.Driver
+    driverClassName: dm.jdbc.driver.DmDriver
+    druid:
+      # 主库数据源
+      master:
+        url: jdbc:dm://192.168.1.157:5236 # DM 连接的示例
+        username: VPP
+        password: 123456789
+      # 从库数据源
+      slave:
+        # 从数据源开关/默认关闭
+        enabled: false
+        url:
+        username:
+        password:
+      # 初始连接数
+      initialSize: 5
+      # 最小连接池数量
+      minIdle: 10
+      # 最大连接池数量
+      maxActive: 20
+      # 配置获取连接等待超时的时间
+      maxWait: 60000
+      # 配置连接超时时间
+      connectTimeout: 30000
+      # 配置网络超时时间
+      socketTimeout: 60000
+      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      timeBetweenEvictionRunsMillis: 60000
+      # 配置一个连接在池中最小生存的时间,单位是毫秒
+      minEvictableIdleTimeMillis: 300000
+      # 配置一个连接在池中最大生存的时间,单位是毫秒
+      maxEvictableIdleTimeMillis: 900000
+      # 配置检测连接是否有效
+      validationQuery: SELECT 1 FROM DUAL
+      testWhileIdle: true
+      testOnBorrow: false
+      testOnReturn: false
+      webStatFilter:
+        enabled: true
+      statViewServlet:
+        enabled: true
+        # 设置白名单,不填则允许所有访问
+        allow:
+        url-pattern: /druid/*
+        # 控制台管理用户名和密码
+        login-username: elf
+        login-password: elf
+      filter:
+        stat:
+          enabled: true
+          # 慢SQL记录
+          log-slow-sql: true
+          slow-sql-millis: 1000
+          merge-sql: true
+        wall:
+          config:
+            multi-statement-allow: true
+  # redis 配置
+  redis:
+    # 地址
+    host: 192.168.1.205
+    # 端口,默认为6379
+    port: 6379
+    # 数据库索引
+    database: 0
+    # 密码
+    password: jiayue
+    # 连接超时时间
+    timeout: 10s
+    lettuce:
+      pool:
+        # 连接池中的最小空闲连接
+        min-idle: 0
+        # 连接池中的最大空闲连接
+        max-idle: 8
+        # 连接池的最大数据库连接数
+        max-active: 8
+        # #连接池最大阻塞等待时间(使用负值表示没有限制)
+        max-wait: -1ms

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
src/main/resources/templates/index.html


+ 1 - 1
vpp-ui/.env.production

@@ -5,7 +5,7 @@ VUE_APP_TITLE = 电力交易辅助系统
 ENV = 'production'
 
 # ELF管理系统/生产环境
-VUE_APP_BASE_API = '/prod-api'
+VUE_APP_BASE_API = ''
 
 # 路由模式
 VUE_ROUTER_MODE = 'hash'

+ 1 - 1
vpp-ui/src/router/index.js

@@ -374,7 +374,7 @@ Router.prototype.replace = function push(location) {
 }
 
 export default new Router({
-  mode: process.env.VUE_ROUTER_MODE,
+  mode: 'hash',
   scrollBehavior: () => ({y: 0}),
   routes: constantRoutes
 })

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff