摘要:
一、没有视图解析器的情况(忽略,不用) 视图解析器 <!-- 视图解析器 --> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" id="internalResourceViewResol 阅读全文
摘要:
1、基本 @Controller 控制层 @Service 业务层 @Component 组件 @Repository dao 2、@RequestMapping url 三、restful 风格 与python的restful差不多 1、不用restful风格 访问链接 http://localh 阅读全文
摘要:
1、添加jar包 <groupId>com.wt</groupId> <artifactId>springmvc</artifactId> <packaging>pom</packaging> <version>1.0-SNAPSHOT</version> <modules> <module>spr 阅读全文
摘要:
<dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> </dependency> <dependency> <groupId>org.sp 阅读全文
摘要:
保证数据的一致性和完整性 官网:http://mybatis.org/spring/zh/transactions.html 声明式事务 spring中配置声明事务 <!--配置声明事务--> <bean id="transactionManager" class="org.springframew 阅读全文
摘要:
官网: http://mybatis.org/spring/zh/getting-started.html 过程 1、导入jar包 junit mybatis mysql spring aop mybatis-spring 2、编写配置文件 3、测试 二、过程 1、maven <!-- 依赖--> 阅读全文
摘要:
三种方式 第二个比较好 导入包 <!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver --> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjw 阅读全文
摘要:
注意:动态代理代理的是接口 一、过程 1、接口类 2、普通类继承接口 3、ProxyInvocationHandler.java(固定格式) 4、应用类 二、案例 public interface User { void add(); void delete(); void update(); vo 阅读全文