From a95c22c8a5de008d1b8b4f97e809ff7750f149c7 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期四, 07 三月 2024 15:32:44 +0800 Subject: [PATCH] 打包插件 --- ycl-server/src/main/resources/application.yml | 2 ycl-server/src/main/resources/application-prod.yml | 62 +++----------------- ycl-server/pom.xml | 21 +++++++ pom.xml | 37 +++--------- 4 files changed, 40 insertions(+), 82 deletions(-) diff --git a/pom.xml b/pom.xml index 99a7e90..c45efd7 100644 --- a/pom.xml +++ b/pom.xml @@ -23,6 +23,7 @@ </modules> <properties> + <spring-boot.version>3.0.6</spring-boot.version> <commons.io.version>2.13.0</commons.io.version> <bitwalker.version>1.21</bitwalker.version> <mybatis.spring.version>3.0.0</mybatis.spring.version> @@ -246,53 +247,33 @@ <build> <plugins> + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>${maven-compiler-plugin.verison}</version> + <version>3.8.0</version> <configuration> <source>${java.version}</source> <target>${java.version}</target> <encoding>${project.build.sourceEncoding}</encoding> <annotationProcessorPaths> + <!-- Lombok 娉ㄨВ澶勭悊鍣� --> <path> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> - <version>${lombok.version}</version> + <version>1.18.26</version> </path> - <path> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-configuration-processor</artifactId> - <version>${spring-boot.version}</version> - </path> - <path> - <groupId>io.github.linpeilie</groupId> - <artifactId>mapstruct-plus-processor</artifactId> - <version>${mapstruct-plus.version}</version> - </path> + <!-- MapStruct 鍜� Lombok 娉ㄨВ缁戝畾澶勭悊鍣� --> <path> <groupId>org.projectlombok</groupId> <artifactId>lombok-mapstruct-binding</artifactId> - <version>${mapstruct-plus.lombok.version}</version> + <version>0.2.0</version> </path> </annotationProcessorPaths> - <compilerArgs> - <arg>-parameters</arg> - </compilerArgs> </configuration> - </plugin> - <!-- 鍗曞厓娴嬭瘯浣跨敤 --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>${maven-surefire-plugin.version}</version> - <configuration> - <!-- 鏍规嵁鎵撳寘鐜鎵ц瀵瑰簲鐨凘Tag娴嬭瘯鏂规硶 --> - <groups>${profiles.active}</groups> - <!-- 鎺掗櫎鏍囩 --> - <excludedGroups>exclude</excludedGroups> - </configuration> + </plugin> </plugins> + <finalName>${project.artifactId}</finalName> </build> </project> diff --git a/ycl-server/pom.xml b/ycl-server/pom.xml index 55b6025..b30767c 100644 --- a/ycl-server/pom.xml +++ b/ycl-server/pom.xml @@ -98,4 +98,25 @@ </dependency> </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <version>${spring-boot.version}</version> + <configuration> + <!-- 濡傛灉娌℃湁璇ラ厤缃紝devtools涓嶄細鐢熸晥 --> + </configuration> + <executions> + <execution> + <goals> + <goal>repackage</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + <finalName>${project.artifactId}</finalName> + </build> </project> \ No newline at end of file diff --git a/ycl-server/src/main/resources/application-prod.yml b/ycl-server/src/main/resources/application-prod.yml index 6ebbe2b..67a8c2f 100644 --- a/ycl-server/src/main/resources/application-prod.yml +++ b/ycl-server/src/main/resources/application-prod.yml @@ -4,7 +4,7 @@ port: 8080 servlet: # 搴旂敤鐨勮闂矾寰� - context-path: / + context-path: /zgyw tomcat: # tomcat鐨刄RI缂栫爜 uri-encoding: UTF-8 @@ -20,56 +20,12 @@ spring: # 鏁版嵁婧愰厤缃� datasource: + url: jdbc:mysql://42.193.1.25:3306/zgyw?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false + username: root + password: 321$YcYl@1970! type: com.alibaba.druid.pool.DruidDataSource - driverClassName: com.mysql.cj.jdbc.Driver - druid: - # 涓诲簱鏁版嵁婧� - url: jdbc:mysql://42.193.1.25:3306/zgyw?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - username: root - password: 321$YcYl@1970! - # 鍒濆杩炴帴鏁� - 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: ruoyi - login-password: 123456 - filter: - stat: - enabled: true - # 鎱QL璁板綍 - log-slow-sql: true - slow-sql-millis: 1000 - merge-sql: true - wall: - config: - multi-statement-allow: true + driver-class-name: com.mysql.cj.jdbc.Driver + jpa: show-sql: true generate-ddl: true @@ -104,12 +60,12 @@ spring.data: redis: # 鍦板潃 - host: 162.14.79.111 + host: 42.193.1.25 # 绔彛锛岄粯璁や负6379 port: 6379 - password: 234#Wersdf! + password: ycl2018 # 鏁版嵁搴撶储寮� - database: 0 + database: 1 # 瀵嗙爜(濡傛病鏈夊瘑鐮佽娉ㄩ噴鎺�) # password: # 杩炴帴瓒呮椂鏃堕棿 diff --git a/ycl-server/src/main/resources/application.yml b/ycl-server/src/main/resources/application.yml index 075ca61..77a9efd 100644 --- a/ycl-server/src/main/resources/application.yml +++ b/ycl-server/src/main/resources/application.yml @@ -19,7 +19,7 @@ # 鍥介檯鍖栬祫婧愭枃浠惰矾寰� basename: i18n/messages profiles: - active: dev + active: prod main: allow-circular-references: true allow-bean-definition-overriding: true -- Gitblit v1.8.0