1.看看你得链接得数据库是什么版本得 2.看看你得数据库连接池是什么 3.url=jdbc:mysql://localhost:3306/pro?serverTimezone=GMT%2B8&zeroDateTimeBehavior=CONVERT_TO_NULL&nullCatalogM 我得问题解决是数据版本不对应得问题。 原文链接: https://blog.csdn.net/xiao_22/article/details/80427343 对比之前那个编译web articple,现在是直接用mavengoal进行部署。
<properties>
<project.webroot.path>${basedir}/src/main/webapp</project.webroot.path>
<project.war.path>${basedir}/target/${project.artifactId}-${project.version}</project.war.path>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>validate</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.webroot.path}/WEB-INF/lib</outputDirectory>
<excludeTransitive>false</excludeTransitive>
<stripVersion>false</stripVersion>
<includeScope>runtime</includeScope>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
<executions>
<execution>
<id>copy-base-classes</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>utf-8</encoding>
<outputDirectory>${project.webroot.path}/WEB-INF/classes</outputDirectory>
<resources>
<resource>
<directory>${module.base.path}/target/classes</directory>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-configuration-lib</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>utf-8</encoding>
<outputDirectory>${project.webroot.path}/WEB-INF/lib</outputDirectory>
<resources>
<resource>
<directory>${module.configuration.path}/src/main/resources/lib</directory>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-configuration</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>utf-8</encoding>
<outputDirectory>${project.webroot.path}/WEB-INF/classes</outputDirectory>
<resources>
<resource>
<directory>${module.configuration.path}/src/main/resources</directory>
<filtering>false</filtering>
<excludes>
<exclude>**/*.jar</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.2</version>
</plugin>
</plugins>
</build>
```
解析:因为已经通过pom文件进行到包了,所以只需要直接启动在tomcat中部署webapp这个项目就行了。
![在这里插入图片描述](https://img-blog.csdnimg.cn/562012b711ef4b92bea1385597c0d2ad.png)
但是连个项目需要编译到那里噢
![在这里插入图片描述](https://img-blog.csdnimg.cn/59728dcdc7d246f3b0b62f91ba36bacc.png)
|