2024年6月10日

springboot使用ComponentScan和MapperScan

摘要: 今天讲springboot项目中的启动类换到了start包下,发现无法扫描并注册javabean. 原因: 容器在启动时会由spring.classPathBeanDefinitionScanner和spring-mybaits.classPathMapperScanner两个类去分别执行doSca 阅读全文

posted @ 2024-06-10 19:34 丶柚子 阅读(285) 评论(0) 推荐(0)

mybatis绑定方法报错Invalid bound statement (not found)

摘要: 搭建springboot和mybatis工程后,spring容器未正确加载mybatisMapper.xml文件(sql执行语句文件) 导致找不到相应绑定的sql mybtais工作原理:由mapperProxy代理对象通过配置mapper接口和调用方法通过反射从sqlsession.configu 阅读全文

posted @ 2024-06-10 02:41 丶柚子 阅读(212) 评论(0) 推荐(0)

导航