打包项目时 开发环境、生产环境数据库不同导致打包时数据库连接不上报错的问题

    xiaoxiao2022-07-04  113

    示例为springboot项目

    1、springboot的maven插件 

    <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <finalName>***</finalName> <mainClass>***</mainClass> </configuration> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> </plugin>

    2、在<properties>标签中加入<skipTests>true</skipTests>

    <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.version>1.8</java.version> <mysql.version>5.1.38</mysql.version> ... <skipTests>true</skipTests> </properties>

    点赞或者评论是我最大的动力,有问题欢迎留言或者联系q:1559810637  

    最新回复(0)