In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Maven+mybatis+spring encountered the following error during development:
Org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'xxxService': Unsatisfied dependency expressed through field' xxxMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxxMapper' defined in file [xxxMapper.class]: Cannot resolve reference to bean' sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name' sqlSessionFactory' defined in class path resource [xxx-mybatis.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/xxx/xxx/mapping/*.xml]: classpath resource [com/xxx/xxx/mapping/] cannot be resolved to URL because it does not exist
After checking, it is found that after maven compilation, the xml file is not packaged to the output path, resulting in the failure of bean creation.
So the solution is to add the following code to the pom file:
... Src/main/java * * / * .xml true...
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.