ssm 到spring boot 校园商铺 day1 开发准备
开发准备
eclipse配置jdk 1.8
2、eclipse配置本地maven 3.5.4
3、eclipse配置tomcat 8
4、创建maven项目
new =》 other =》 maven =》 maven project
创建完报错:
缺javax.servlet类(缺少tomcat下一个jar包,引入即可)
解决方法如下:
properties =》 java build path =》 libraris => add libraris =>server runtime
解决warning
需要修改pom 添加maven编译 依赖工具
<build>
<finalName>o2o</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF8</encoding>
</configuration>
</plugin>
</plugins>
</build>
添加source folder
new => source folder => src/test/resources
配置项目输出文件:
src/test/resources
修改动态网页模型配置
F5刷新项目
修改web.xml约束
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1"
metadata-complete="true">
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
发布服务:
右击server =》 add or remove => clean => start
localhost:8080/o2o =>