Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven 启动TestSpringMybatis有问题 #2

Open
arafat5549 opened this issue Oct 16, 2016 · 3 comments
Open

Maven 启动TestSpringMybatis有问题 #2

arafat5549 opened this issue Oct 16, 2016 · 3 comments

Comments

@arafat5549
Copy link

Tests in error:
testXmlInsert(cn.kiiwii.framework.spring.TestSpring.SpringWithMybatisTest): Error creating bean with name 'cn.kiiwii.framework.spring.TestSpring.SpringWithMybatisTest': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'testXmlService' is defined

一直有No bean named 'testXmlService' is defined 不知道为什么!

@zhonglinlin1305
Copy link
Owner

确保将resources文件夹设置为resources roor(intellij idea ),或者添加到source中(eclipse)

@jiyanlong2017
Copy link

配置文件位置配置好了吗

@crackwl8
Copy link

crackwl8 commented Aug 4, 2017

在eclipse中还有一种表现就是单元测试test报错 java.lang.IllegalStateException: Failed to load ApplicationContext
在pom文件中增加一项
<resource> <directory>src/main/resources</directory> <includes> <include>**/*.*</include> </includes> </resource>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants