-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Description
I have a testcase that uses
@PropertySource(value = "classpath:test.properties")
In this file I have:
spring.messages.basename=messages-base
And in message-base_en.properties I have some message keys that are used in the unit test, but the values cannot be found
I extracted all the required code into an own github repository: https://github.com/klu2/spring-boot-issues/
This is the test case:
https://github.com/klu2/spring-boot-issues/blob/master/autoconfigure/src/test/java/net/klu2/springboot/autoconfigure/MessageSourceAutoConfigurationTest.java
This testcase passes with spring boot 1.0.2, but it fails with spring boot 1.1.0 (you can easily check that by exchanging ext.springBootVersion in build.gradle
Most probably this commit is responsible for this issue: 0def764 (#1019)
It works fine, if the messages are in message.properties, but not in message-base.properties. It seems that @propertysource is not considered in the MessageSourceAutoConfiguration