一些知识点

1、mybatis对应的实体类要有一个无参数的构造函数否则会报如下错误.

Error instantiating class com.xx.QueryUserResp with invalid types (DUser) or values (6). Cause: java.lang.IllegalArgumentException: argument type mismatch

2、注解

  • myBatis中mapper对应的dao要有@Mapper注解,如果该dao在idea中有红线,再增加@Repostory注解。
  • Service的实现类要有@Service注解。此时默认的service 名称为该serive的首字母小写类名。
  • 当一个接口有两个实现类时,如何调用呢
@Resource(name="imgDataDao")                             

private DataDao xx;

或者:

@Autowired

@Qualifier("imgDataDao")

private DataDao yy;

  • @Bean注解的作用
  • @Param("classifyIds")
List queryListByClassifyIds(@Param("classifyIds") List classifyIds);


3、工具类

  • DateFormatUtils
Date date = new Date();
System.out.println(DateFormatUtils.format(date, "yyyy-MM-dd HH:mm:ss"));
  • BeanUtils
  • MessageFormat \ String.format

4、框架

  • Ehcache

5、 SpringBoot-行锁 百度学习下

6、redis缓存击穿

你可能感兴趣的:(一些知识点)