Skip to content

mxab/gradle-spring-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Buildship union classpath issue

We have a service bean (MyService) that is picked up by Spring's component scan in the classpath.

For our tests we want to override our component and therefore add a Test Configuration that provides another MyService bean that is primary so it gets picked up

If you build/run it with gradle via the command line you will see that:

  • the tests will output the message from the MyService bean from the test config (./gradlew test ) ("THIS IS A TEST MESSAGE")

  • the run will output from the real MyService bean (./gradlew bootRun) ("Hello World")

If you run it in eclipse imported via buildship with the "Run as Java Application" and "Run as Junit test" you will both times see:

"THIS IS A TEST MESSAGE"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages