1.客户要求回调项目时需要项目名称,否则设计跨域问题,然后在pom文件增加
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<path>ods</path>
<port>80</port>
<contextFile>${basedir}/target/classes/context.xml</contextFile>
</configuration>
</plugin>
如上代码:
结果报错:
严重: Servlet.service() for servlet jsp threw exception
java.lang.IllegalArgumentException: Negative time
2、然后疯狂的找解决办法,发现说的都很有道理,最后自己启动项目时发现url:localhost:80ods
解决办法:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<path>/ods</path>
<port>80</port>
<contextFile>${basedir}/target/classes/context.xml</contextFile>
</configuration>
</plugin>
加了一个/ ,run as --》maven build,重启问题解决。