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>
main_update-antora-ui-spring
Guillaume Husta 3 weeks ago committed by Rob Winch
parent
commit
bb7fcb27ef
  1. 4
      docs/modules/ROOT/pages/servlet/configuration/java.adoc

4
docs/modules/ROOT/pages/servlet/configuration/java.adoc

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

Loading…
Cancel
Save