1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

后端微服务配置上线

This commit is contained in:
2023-04-18 03:48:38 +08:00
parent c77a4c98fc
commit cb1b0e4e7e
31 changed files with 188 additions and 24 deletions

View File

@@ -118,6 +118,34 @@
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.7.5</version>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
<!--
解决项目打包后运行如下报错
no main manifest attribute, in /xxxx/xxxx-0.0.1-SNAPSHOT.jar
refer: https://www.baeldung.com/spring-boot-fix-the-no-main-manifest-attribute
-->
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->

View File

@@ -0,0 +1,10 @@
spring:
datasource:
url: jdbc:mysql://127.0.0.1:3306/epp?useUnicode=true&characterEncoding=utf8&useSSL=false
username: epp
password: NJ4ED7LKGJy4fBc5
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8488
namespace: production

View File

@@ -15,6 +15,7 @@ spring:
nacos:
discovery:
server-addr: 127.0.0.1:8848
namespace: public
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver