-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Remove @Configuration meta-annotation from @Enable annotations #6613
Comments
Note that we will want to update the documentation examples to include |
@sjohnr I would like to help on this, as I was anyhow looking into the documentation part. |
@sjohnr I will take care of the reference documentation, javadoc and samples. The actual removal of the |
Before, Spring Security's @enable* annotations were meta-annotated with @configuration. While convenient, this is not consistent with the rest of the Spring projects and most notably Spring Framework's @enable annotations. Additionally, the introduction of support for @configuration(proxyBeanMethods=false) in Spring Framework provides a compelling reason to remove @configuration meta-annotation from Spring Security's @enable annotations and allow users to opt into their preferred configuration mode. Closes spring-projectsgh-6613 Signed-off-by: Joshua Sattler <joshua.sattler@mailbox.org>
Before, Spring Security's @enable* annotations were meta-annotated with @configuration. While convenient, this is not consistent with the rest of the Spring projects and most notably Spring Framework's @enable annotations. Additionally, the introduction of support for @configuration(proxyBeanMethods=false) in Spring Framework provides a compelling reason to remove @configuration meta-annotation from Spring Security's @enable annotations and allow users to opt into their preferred configuration mode. Closes spring-projectsgh-6613 Signed-off-by: Joshua Sattler <joshua.sattler@mailbox.org>
Quite some files changed, hope that's okay for a single PR. If you have any suggestions to split this up, please let me know. |
A note for self. I used the following to check for missing import re
import sys
enable_regex = r".*@Enable[a-zA-Z]+(Security|Authentication).*"
config_regex = r".*@Configuration.*"
A = 2
B = 2
file_name = sys.argv[1]
try:
file = open(file_name, 'r')
lines = file.readlines()
except Exception as err:
print ("Could not open file:", file_name, repr(err))
sys.exit()
def find_regex_in_range(lines, regex, range):
for index in range:
peek_line = lines[index - 1]
if (re.match(regex, peek_line)):
return True
return False
def print_range(lines, range):
for index in range:
peek_line = lines[index - 1]
print(f"{index} {peek_line}", end = "")
line_count = 0
for line in lines:
line_count += 1
if (re.match(enable_regex, line)):
before_range = range(line_count - B, line_count)
after_range = range(line_count + 1, line_count + A + 1)
if (find_regex_in_range(lines, config_regex, before_range) or find_regex_in_range(lines, config_regex, after_range)):
continue
print (f"{file_name}")
print ("---")
print_range(lines, before_range)
print (f"{line_count} {line}", end = "")
print_range(lines, after_range)
print ("---") Then run
|
Closing in favor of gh-11653 |
#### What type of PR is this? /kind cleanup /area core /milestone 2.0 #### What this PR does / why we need it: This PR mainly upgrades version of dependencies and removes unused dependencies. See the following references for more: - https://github.com/spring-projects/spring-boot/releases/tag/v3.0.0-M5 - https://github.com/jhy/jsoup/releases/tag/jsoup-1.15.3 - spring-projects/spring-security#6613 #### Does this PR introduce a user-facing change? ```release-note None ```
Currently, all Spring Security's
@Enable
annotations are meta-annotated with@Configuration
. While convenient, this is not consistent with the rest of the Spring projects and most notably Spring Framework's@Enable
annotations.Additionally, the introduction of support for
@Configuration(proxyBeanMethods=false)
in Spring Framework provides a compelling reason to remove@Configuration
meta-annotation from Spring Security's@Enable
annotations and allow users to opt into their preferred configuration mode.The text was updated successfully, but these errors were encountered: