-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: enhancementA general enhancementA general enhancement
Milestone
Description
I noticed that you've deprecated Environment.acceptsProfiles(String... profiles)
in favor of a method that takes a Profile
instance.
I can guess at the motivations behind this, but you might not have considered that this will cause problems in environments where it's easier to work with strings. (After all, profiles start out identified by strings.) For example, in Thymeleaf I might want to only include something if the active profile is production
, as explained on Stack Overflow:
<div th:if="${#arrays.contains(@environment.getActiveProfiles(),'production')}">
This is the production profile
</div>
If you eventually remove Environment.acceptsProfiles(String... profiles)
, this sort of thing will become more difficult.
Can you suggest an alternative in Thymeleaf?
Otherwise, you might want to reconsider deprecating this method.
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: enhancementA general enhancementA general enhancement