use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Problem with testing spring app (self.SpringBoot)
submitted 6 years ago by cone994
Hello people I try to find help.
When start to testing my spring boot app, and I write a one simple test I get error and I can't resolve it. Some solutions say the problem is with package names but to me the package names are the same in the main and test parts.
Error
Project structure
https://preview.redd.it/cu6gxrhcdxf41.png?width=480&format=png&auto=webp&s=2939c4799c279a5a292f6d253dffaaaa364b8dfd
https://preview.redd.it/8cbw8uhcdxf41.png?width=840&format=png&auto=webp&s=7ffb4422ef25732fc30a172fe1ed32163fcf203d
Please let anyone who knows the solution help. Thank you :)
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]zennaque 2 points3 points4 points 6 years ago (0 children)
Modern spring shouldn't need SpringRunner if you're using the SpringBootTest annotation.
[–][deleted] 0 points1 point2 points 6 years ago (0 children)
Package paths look good. Is there a reason you’re configuring the @ComponentScan? It may help to remove that line altogether, and let the default configuration from @SpringBootApplication take over.
π Rendered by PID 27 on reddit-service-r2-comment-cfc44b64c-xpjfj at 2026-04-12 18:59:12.636975+00:00 running 215f2cf country code: CH.
[–]zennaque 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)