0

We started to use jhipster for our Microservices, when migrating the old code an issue arises, that our unit tests do not start anymore cause of missing or duplicate beans.

Searching for an answer led me to theses similar questions:

  1. Cannot run Unit Tests against REST layer
  2. @ComponentScan in application class breaks @WebMvcTest and @SpringBootTest

As soon as I add the exclusions to the ComponentScan-Annotation of the generated application class the WebMvcTest run successfully.

Are there any reasons why these exclusions are missing in jhipster-generated application class?

stoetti
  • 93
  • 1
  • 5
  • Can you please give an example of the issue your are encountering as well as specify which version of JHipster you are using. To me @SpringBootTest does work as shown in this example: https://github.com/jhipster/jhipster-sample-app/blob/v4.14.1/src/test/java/io/github/jhipster/sample/web/rest/BankAccountResourceIntTest.java – Pierre Besson May 23 '18 at 13:06
  • I created a small project on github with a single 'WebMvcTest' that is failing as soon as the excludeFilters are removed. https://github.com/stoetti/webmvctestdemo I am using jhipster version 4.14.4 – stoetti May 25 '18 at 04:26

0 Answers0