ssi框架 在dao层打成jar包时 放到项目中不好用的原因
啥大成jar包后mybatis sql映射文件在application中配置应该使用全名:
classpath*:org/manage/resources/mybatis/UserMapper.xml
不要使用org/manage/resources/mybatis/*.xml
<!-- SqlSessionFactory設定 -->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<!--<property name="configLocation" value="classpath:mybatis-config.xml"/> -->
<property name="mapperLocations" >
<list>
<value>classpath*:org/suntec/servicemanage/resources/mybatis/IconMapper.xml</value>
</list>
</property>
<property name="configLocation" value="WEB-INF/conf/mybatis.xml" />
</bean>