Skip to content

Resource bundle not found from MessageSourceAutoConfiguration in integration test #4438

@MichaelF25

Description

@MichaelF25

I am just refactoring a spring boot application (using 1.2.7.RELEASE) in order to break it up into two applications. So my updated project structure looks like this:

  • common (shared stuff, including a resource bundle for I18N)
  • app1
  • app2

With this changed structure the resource bundle is not found by spring boot's MessageSourceAutoConfiguration class within my WebIntegrationTest.
However if I try to debug this behaviour inside my IntelliJ IDE, everything works fine - same situation if the tests are ignored during the build and the application is started.

I've provided a sample reduced to the absolute minimum demonstrating this issue. mvn verify fails, but it works with debugger and executed as standalone jar. Seems like some class loading issue.

Sample project: https://github.com/MichaelF25/spring-boot-messagesource-bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions