In some configurations, Configuration classes with static elements
may cause a test to hang. This commit changes JeeConfigurerTests
test configuration classes to use mock beans instead of referencing
them as static fields.
It's friendly for Spring Boot's `@ConditionalOnMissingBean`, and:
>> When defining a Spring `@Bean` method, it is generally recommended to declare the most specific type possible as the method's return type. This means returning the concrete class of the bean, or the most specific interface that the bean implements and through which it will be referenced in the application.
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
The Spring portfolio is changing to use <inception-year>-present in
the copyright headers to simplify keeping headers up to date. This
commit updates the headers and the checkstyle accordingly.
The commit updated etc/checkstyle/header.txt
It also updated the copyright headers using the following find/replace:
Find: (Copyright \d{4})\s*(\-\d{4})? the original author or authors.
Replace: Copyright 2004-present the original author or authors.
Closes gh-17633
This just renames the Configurer names used in
AbstractConfiguredSecurityBuilderTests to be more meaningful.
Issue gh-17020 gh-17011
Signed-off-by: Rob Winch <362503+rwinch@users.noreply.github.com>
A getter should not mutate state. This removes getConfigurersInInitializing
in favor of inline code since this is just used once.
Issue gh-17020 gh-17011
Signed-off-by: Rob Winch <362503+rwinch@users.noreply.github.com>
Originally, it was thought that this feature would be rather uncommon;
however, given some feedback from the Boot team, it makes sense to make
this easier to configure.
Of specific note is migrating from an earlier version were the
servlet path did not need to be specified in authorizeHttpRequests.
Since it does in 7, this will be a significant migration for those
who have a servlet path configured. This setter simplifies that a great
deal, including simplifying Boot's support of it.
Closes gh-17579