Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Spring Boot 2.4 @EntityScan does not support property substitution #25436

Closed
tjuchniewicz opened this issue Feb 25, 2021 · 2 comments
Closed
Labels
type: regression A regression from a previous release
Milestone

Comments

@tjuchniewicz
Copy link

@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

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 25, 2021
@wilkinsona
Copy link
Member

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
Copy link
Member

As @mbhave noted in #25415, @ComponentScan supports placeholders so we think it makes sense to reinstate @EntityScan's support for placeholders.

@wilkinsona wilkinsona added type: regression A regression from a previous release and removed for: team-attention An issue we'd like other members of the team to review status: waiting-for-triage An issue we've not yet triaged labels Mar 4, 2021
@wilkinsona wilkinsona added this to the 2.4.x milestone Mar 4, 2021
@wilkinsona wilkinsona modified the milestones: 2.4.x, 2.4.4 Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: regression A regression from a previous release
Projects
None yet
Development

No branches or pull requests

3 participants