出现的问题,
1.没有把jsp页面打进去
2.版本问题导致编译错误
3.指定主口文件
以下为修改好的pom
修改pom文件,
<resources> <resource> <directory>src/main/resources</directory> <filtering>false</filtering> </resource> <resource> <directory>src/main/webapp</directory> <!-- 注意此次必须要放在此目录下才能被访问到 --> <targetPath>META-INF/resources</targetPath> <includes> <include>**/**</include> </includes> </resource> </resources> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>1.4.2.RELEASE</version> <configuration> <mainClass>cn.taotao.Zhouyi3Application</mainClass> <excludes> <exclude> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> </exclude> </excludes> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <configuration> <encoding>UTF-8</encoding> <useDefaultDelimiters>true</useDefaultDelimiters> </configuration> </plugin> </plugins>
java启动命令
1
2
3
4
|
# 以应用参数的方式 java -jar <path/to/my/jar> --server.port= 7788 # 或以 JDK 参数的方式 java -Dserver.port= 7788 -jar <path/to/my/jar> |