摘要: <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt</artifactId> <version>0.9.1</version></dependency> 工具类:import com.example.online_clas 阅读全文
posted @ 2021-12-02 21:53 智慧搬运工 阅读(501) 评论(0) 推荐(0)
摘要: Mapper.xml文件:<resultMap id="VideoDetailResultMap" type="Video"> <id column="id" jdbcType="INTEGER" property="id"/> <result column="title" jdbcType="VA 阅读全文
posted @ 2021-12-01 20:04 智慧搬运工 阅读(58) 评论(0) 推荐(0)
摘要: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional></dependency> <plugin> 阅读全文
posted @ 2021-12-01 12:47 智慧搬运工 阅读(36) 评论(0) 推荐(0)
摘要: 在service实现类中添加注解 @Transactional在启动类中添加允许事务管理注解 @EnableTransactionManagement效果:即使在对数据操作中出现了异常,也不会更改数据库,调用回滚。 阅读全文
posted @ 2021-11-30 14:41 智慧搬运工 阅读(169) 评论(0) 推荐(0)
摘要: @Around("aspect()")public void around(JoinPoint joinPoint){ //获取目标类 Object target = joinPoint.getTarget().getClass().getName(); System.out.println(tar 阅读全文
posted @ 2021-11-28 21:30 智慧搬运工 阅读(122) 评论(0) 推荐(0)
摘要: import org.aspectj.lang.JoinPoint;import org.aspectj.lang.annotation.After;import org.aspectj.lang.annotation.Aspect;import org.aspectj.lang.annotatio 阅读全文
posted @ 2021-11-28 15:17 智慧搬运工 阅读(77) 评论(0) 推荐(0)
摘要: AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();context.scan("com.example");context.refresh();类中添加注解@component(" 阅读全文
posted @ 2021-11-27 20:51 智慧搬运工 阅读(27) 评论(0) 推荐(0)
摘要: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance 阅读全文
posted @ 2021-11-27 14:49 智慧搬运工 阅读(121) 评论(0) 推荐(0)
摘要: import java.lang.reflect.InvocationHandler;import java.lang.reflect.Method;import java.lang.reflect.Proxy;public class JDKProxy implements InvocationH 阅读全文
posted @ 2021-11-26 22:41 智慧搬运工 阅读(85) 评论(0) 推荐(0)
摘要: <!-- 通过名称自动注入<bean id="videoOrder" class="com.example.demo01.domain.VideoOrder" autowire="byName"> --> <!-- 通过类型自动注入 <bean id="videoOrder" class="com. 阅读全文
posted @ 2021-11-25 21:21 智慧搬运工 阅读(36) 评论(0) 推荐(0)