Skip to content

Commit bb7fcb2

Browse files
ghustarwinch
authored andcommitted
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 #17957 Signed-off-by: Guillaume Husta <guillaume.husta@gmail.com>
1 parent 19cbd9c commit bb7fcb2

File tree

1 file changed

+2
-2
lines changed
  • docs/modules/ROOT/pages/servlet/configuration

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,14 +493,14 @@ public class MyCustomDsl extends AbstractHttpConfigurer<MyCustomDsl, HttpSecurit
493493
private boolean flag;
494494
495495
@Override
496-
public void init(HttpSecurity http) throws Exception {
496+
public void init(HttpSecurity http) {
497497
// any method that adds another configurer
498498
// must be done in the init method
499499
http.csrf().disable();
500500
}
501501
502502
@Override
503-
public void configure(HttpSecurity http) throws Exception {
503+
public void configure(HttpSecurity http) {
504504
ApplicationContext context = http.getSharedObject(ApplicationContext.class);
505505
506506
// here we lookup from the ApplicationContext. You can also just create a new instance.

0 commit comments

Comments
 (0)