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.
I noticed that you've deprecated
Environment.acceptsProfiles(String... profiles)in favor of a method that takes aProfileinstance.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: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.