Mac下Mybatis + Intellij 编译报错SqlSessionTemplate cannot be resolved to a type

八云君 发布于 2016/02/26 11:00
阅读 2K+
收藏 0

Intellij导入Eclipse的web工程,编译报错

Caused by: java.lang.Error: Unresolved compilation problems: 
	The import org.mybatis cannot be resolved
	SqlSessionTemplate cannot be resolved to a type
	SqlSessionTemplate cannot be resolved to a type
	SqlSessionTemplate cannot be resolved to a type
	SqlSessionTemplate cannot be resolved to a type
	SqlSessionTemplate cannot be resolved to a type

	at com.sunlord.core.db.BaseMyBatisDao.<init>(BaseMyBatisDao.java:19)
	at com.sunlord.core.db.GenericDao.<init>(GenericDao.java:18)
	at com.sunlord.platform.dao.admin.WhatsNewDao.<init>(WhatsNewDao.java:11)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
	... 62 more



在Eclipse下编译没有问题,可以成功运行项目,但是Intellij下出错。
项目运行环境设置了jdk1.8.0_51,tomcat也是。
用gradle导入了MyBatis相关jar包 mybatis3.2.6 和 mybatis-spring1.2.2



加载中
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部