SSM 框架整合
配置整合
1 | 步骤: |
pom.xml
spring依赖
1 | <!-- https://mvnrepository.com/artifact/junit/junit --> |
springmvc依赖
1 | <!-- 移除了和 spring 重叠的 spring-context --> |
mybatis依赖
1 | <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis --> |
spring和mybatis整合依赖
1 | <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis-spring --> |
web.xml
1 |
|
springmvc.xml
1 |
|
spring.xml
1 |
|
db.properties
1 | driver=com.mysql.cj.jdbc.Driver |
EmpDao.xml
1 |
|
Emp.java
1 | public class Emp { |
EmpDao.java
1 | public interface EmpDao { |
SSMController.java
1 |
|
最后更新: 2020年11月12日 12:23