第一步:打开IDEA开发软件
第二步:点击maven(选择maven-archetype-webapp)
第三步:在pom.xml添加依赖(核心依赖)
spring-beans、spring-context
spring-web、spring-webmvc、spring-jdbc
mybatis、mybatis-spring
druid
mysql
lombok
jackson
logback(新增依赖)
第四步:web.xml的配置
1、contextLoaderLister(监听spring beans配置文件)-------连接到appicationContext.xml文件
2、spring mvc配置--------------------------------------------------连接到spring-servlet.xml文件
3、编码(encoding)配置
4、新添加druid
第五步:spring-servlet.xml的配置
第六步:applicationContext.xml配置
第七步:mybatis-config.xml配置
第八步:logback.xml配置