我在整合spring+mybatis時,有這樣二個錯
1。開啟事件注解驅動,就一直在報錯。
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.event.internalEventListenerProcessor': Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: 'boolean org.springframework.core.annotation.AnnotationUtils.isCandidateClass(java.lang.Class, java.lang.Class)'
2。在用mapperLocations 時,一直在報
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.SqlSessionFactoryBean#0' defined in class path resource [Spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'org.springframework.core.io.Resource[]' for property 'mapperLocations'; nested exception is java.lang.IllegalArgumentException: Could not resolve resource location pattern [classpath:com/test/ssm/mapper/*.xml]: class path resource [com/test/ssm/mapper/] cannot be resolved to URL because it does not exist


uj5u.com熱心網友回復:
可能是jar包版本的問題uj5u.com熱心網友回復:
首選先檢查是否存在該路徑,如果不存在那么只需要在對應的resources上建立對應的檔案即可,再看看對應路徑上是否存在mapper.xml,如果沒有則需要建立檔案,因為mybatis沒有檔案會報
錯。
重點檢查:classpath:com/test/ssm/mapper/*.xml
uj5u.com熱心網友回復:
有沒有,進一步的解決資訊現在這個都不知道怎么查起。。。
uj5u.com熱心網友回復:
你是新搭建的專案嗎uj5u.com熱心網友回復:
對的新搭建的,里面沒有邏輯程式現在就一個組態檔整合,都報錯
uj5u.com熱心網友回復:
還確實是JAR包版本的問題引起的。。轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/165249.html
標籤:Web 開發
上一篇:Android WindowManager 全域懸浮窗 + AccessibilityService+ RecyclerView 拖動和點擊
