Browse Source

docs: Fix example in MyCustomDsl to remove throws Exception

In `init` and `configure`, throws Exception has been removed in the super interface `SecurityConfigurer`, since Spring Security 7.0.
This change is the consequence of https://github.com/spring-projects/spring-security/issues/17957

Signed-off-by: Guillaume Husta <guillaume.husta@gmail.com>
Guillaume Husta 1 week ago
parent
commit
bb7fcb27ef
1 changed files with 2 additions and 2 deletions
  1. 2 2
      docs/modules/ROOT/pages/servlet/configuration/java.adoc

+ 2 - 2
docs/modules/ROOT/pages/servlet/configuration/java.adoc

@@ -493,14 +493,14 @@ public class MyCustomDsl extends AbstractHttpConfigurer<MyCustomDsl, HttpSecurit
 	private boolean flag;
 	private boolean flag;
 
 
 	@Override
 	@Override
-	public void init(HttpSecurity http) throws Exception {
+	public void init(HttpSecurity http) {
 		// any method that adds another configurer
 		// any method that adds another configurer
 		// must be done in the init method
 		// must be done in the init method
 		http.csrf().disable();
 		http.csrf().disable();
 	}
 	}
 
 
 	@Override
 	@Override
-	public void configure(HttpSecurity http) throws Exception {
+	public void configure(HttpSecurity http) {
 		ApplicationContext context = http.getSharedObject(ApplicationContext.class);
 		ApplicationContext context = http.getSharedObject(ApplicationContext.class);
 
 
 		// here we lookup from the ApplicationContext. You can also just create a new instance.
 		// here we lookup from the ApplicationContext. You can also just create a new instance.