SpringMVC MockMvc test Can't find bundle for base name javax. servlet. LocalStrings, locale zh_CN error, strings
Let's talk about my environment: jdk1.8, springMVC5.0, meclipse2014, junit4.12
When I use MockMVC, which comes with spring mvc, for unit testing, the following error occurs:
Can't find bundle for base name javax. servlet. LocalStrings, locale zh_CN
When viewing specific errors, you can see:
I found a lot of posts on the Internet and did not find a specific solution. I found an article on Google about the lack of java ee APIs similar to this error. I tried to import all the API packages related to java ee, but still did not solve the error. The other is about the lack of servlet-related APIs for Maven projects. If you fail to solve the problem based on my methods, refer to their ideas. However, they gave me a prompt, indicating that I had few things. When I presented my problem to my teacher, he tried a solution based on this clue, the reason is that I lack related packages for the WEB service runtime environment.
If you are using myeclipse, try the following operations:
1.
2.
3.
Test again
The problem is solved perfectly ..
Forward and indicate the source ....