Closed
Description
@SpringBootApplication
@EntityScan("com.${test}")
public class EntityScanExampleApplication {
public static void main(String[] args) {
SpringApplication.run(EntityScanExampleApplication.class, args);
}
}
test=value
For code above, in Spring Boot 2.4 entityscan.getPackageNames()
returns com.${test}
.
Worked in Spring Boot 2.3 and before.
Project to reproduce and check with 2.3: https://github.com/tjuchniewicz/spring-boot-entityscan-issue
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
wilkinsona commentedon Feb 25, 2021
Thanks for the report. To my knowledge, we have never intentionally supported placeholders in
@EntityScan
. We certainly don't have a test for it anyway. The change in behaviour is due to the changes that we made for #22318. Moving away from reflection has meant that the constructor arguments no longer go through placeholder resolution.Flagging for team attention to see if we want to reinstate the old behaviour and discuss how best to do that without regressing #22318.
wilkinsona commentedon Mar 4, 2021
As @mbhave noted in #25415,
@ComponentScan
supports placeholders so we think it makes sense to reinstate@EntityScan
's support for placeholders.Reinstate support for placeholders in @EntityScan
19 remaining items