最近使用spring-boot,druid,Mybatis写了一些东西
其中@MapperScan("com.varicom.mapper") 扫描
到这里都没问题,eclipse启动和打包运行都没问题
后来工程引入snaker,根据snaker 2.4的mybatis配置
<!-- mybatis access -->
<bean id="dbAccess" class="org.snaker.engine.access.mybatis.MybatisAccess">
<property name="sqlSessionFactory" ref="sqlSessionFactory"/>
</bean>
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="configLocation" value="classpath:mybatis.cfg.xml"></property>
<property name="dataSource" ref="dataSource" />
<property name="typeAliasesPackage" value="org.snaker.engine.entity" />
</bean>
使用 mybatis ,需要在 mybatis.cfg.xml 配置文件中增加 snaker 的类型及映射文件
<typeAliases>
<package name="org.snaker.engine.entity"/>
</typeAliases>
<mappers>
<mapper resource="mapper/process.xml"/>
<mapper resource="mapper/order.xml"/>
<mapper resource="mapper/task.xml"/>
<mapper resource="mapper/task-actor.xml"/>
<mapper resource="mapper/hist-order.xml"/>
<mapper resource="mapper/hist-task.xml"/>
<mapper resource="mapper/hist-task-actor.xml"/>
<mapper resource="mapper/query.xml"/>
<mapper resource="mapper/hist-query.xml"/>
<mapper resource="mapper/surrogate.xml"/>
</mappers>
eclispe启动,访问一切ok,
而后工程打包运行便会卡住在
2015-01-27 11:43:53.094 INFO 32936 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'dataSource' of type [class com.alibaba.druid.pool.DruidDataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
不知道但大家见过此类问题不?
@wenshao
@Dead_knight
使用 mybatis ,需要在 mybatis.cfg.xml 配置文件中增加 snaker 的类型及映射文件
<typeAliases>
< package name="org.snaker.engine.entity"/>
< /typeAliases>
< mappers>
< mapper resource="mapper/process.xml"/>
< mapper resource="mapper/order.xml"/>
< mapper resource="mapper/task.xml"/>
< mapper resource="mapper/task-actor.xml"/>
< mapper resource="mapper/hist-order.xml"/>
< mapper resource="mapper/hist-task.xml"/>
< mapper resource="mapper/hist-task-actor.xml"/>
< mapper resource="mapper/query.xml"/>
< mapper resource="mapper/hist-query.xml"/>
< mapper resource="mapper/surrogate.xml"/>
< /mappers>
这段配置不需要的
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。