摘要: package mybatis; import org.apache.ibatis.binding.MapperMethod; import org.apache.ibatis.executor.statement.StatementHandler; import org.apache.ibatis 阅读全文
posted @ 2020-11-10 19:26 刃牙 阅读(963) 评论(0) 推荐(0) 编辑
摘要: 自定义starter 思路 将我们的bean,加载到调用者的spring容器中。 还是采用@configuration和@bean,或是@component注解。 @component 如果采用这种方式,需要在调用的主类上添加扫描到starter的路径,@ComponentScan("#{start 阅读全文
posted @ 2020-11-10 19:24 刃牙 阅读(225) 评论(0) 推荐(0) 编辑
摘要: Mybatis整合Spring思路 需要解决的问题和解决思路 1、如何将接口注入到容器 这个在Mybatis其实已经做好了,是通过动态代理的方式,将接口由代理类注入; 但是要采取一种合适的方式注入,我们常用的方式有@component注解,或是通过@configuration和@bean注解,但是这 阅读全文
posted @ 2020-11-10 18:27 刃牙 阅读(220) 评论(0) 推荐(0) 编辑