File tree Expand file tree Collapse file tree 4 files changed +8
-9
lines changed
src/main/java/com/ksoot/problem/spring Expand file tree Collapse file tree 4 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 6
6
7
7
<groupId >io.github.officiallysingh</groupId >
8
8
<artifactId >spring-boot-problem-handler</artifactId >
9
- <version >1.9</version >
9
+ <version >1.9.1 </version >
10
10
<name >spring-boot-problem-handler</name >
11
11
<description >Commons exception handler library</description >
12
12
<url >https://github.com/officiallysingh/spring-boot-problem-handler</url >
Original file line number Diff line number Diff line change 4
4
import jakarta .servlet .http .HttpServletRequest ;
5
5
import jakarta .servlet .http .HttpServletResponse ;
6
6
import java .io .IOException ;
7
- import org .springframework .beans .factory .annotation .Qualifier ;
8
7
import org .springframework .security .access .AccessDeniedException ;
9
8
import org .springframework .security .web .AuthenticationEntryPoint ;
10
9
import org .springframework .security .web .access .AccessDeniedHandler ;
@@ -22,8 +21,7 @@ public class ProblemAccessDeniedHandler implements AccessDeniedHandler {
22
21
23
22
private final HandlerExceptionResolver resolver ;
24
23
25
- public ProblemAccessDeniedHandler (
26
- @ Qualifier ("handlerExceptionResolver" ) final HandlerExceptionResolver resolver ) {
24
+ public ProblemAccessDeniedHandler (final HandlerExceptionResolver resolver ) {
27
25
this .resolver = resolver ;
28
26
}
29
27
Original file line number Diff line number Diff line change 2
2
3
3
import jakarta .servlet .http .HttpServletRequest ;
4
4
import jakarta .servlet .http .HttpServletResponse ;
5
- import org .springframework .beans .factory .annotation .Qualifier ;
6
5
import org .springframework .security .core .AuthenticationException ;
7
6
import org .springframework .security .web .AuthenticationEntryPoint ;
8
7
import org .springframework .security .web .access .AccessDeniedHandler ;
@@ -20,8 +19,7 @@ public class ProblemAuthenticationEntryPoint implements AuthenticationEntryPoint
20
19
21
20
private final HandlerExceptionResolver resolver ;
22
21
23
- public ProblemAuthenticationEntryPoint (
24
- @ Qualifier ("handlerExceptionResolver" ) final HandlerExceptionResolver resolver ) {
22
+ public ProblemAuthenticationEntryPoint (final HandlerExceptionResolver resolver ) {
25
23
this .resolver = resolver ;
26
24
}
27
25
Original file line number Diff line number Diff line change 6
6
import com .ksoot .problem .spring .boot .autoconfigure .SecurityAdviceEnabled ;
7
7
import com .ksoot .problem .spring .config .ProblemProperties ;
8
8
import lombok .RequiredArgsConstructor ;
9
+ import org .springframework .beans .factory .annotation .Qualifier ;
9
10
import org .springframework .boot .autoconfigure .condition .ConditionalOnClass ;
10
11
import org .springframework .boot .autoconfigure .condition .ConditionalOnMissingBean ;
11
12
import org .springframework .boot .autoconfigure .condition .ConditionalOnWebApplication ;
@@ -37,13 +38,15 @@ public class WebSecurityExceptionHandler
37
38
38
39
@ ConditionalOnMissingBean
39
40
@ Bean
40
- AuthenticationEntryPoint authenticationEntryPoint (final HandlerExceptionResolver resolver ) {
41
+ AuthenticationEntryPoint authenticationEntryPoint (
42
+ @ Qualifier ("handlerExceptionResolver" ) final HandlerExceptionResolver resolver ) {
41
43
return new ProblemAuthenticationEntryPoint (resolver );
42
44
}
43
45
44
46
@ ConditionalOnMissingBean
45
47
@ Bean
46
- AccessDeniedHandler accessDeniedHandler (final HandlerExceptionResolver resolver ) {
48
+ AccessDeniedHandler accessDeniedHandler (
49
+ @ Qualifier ("handlerExceptionResolver" ) final HandlerExceptionResolver resolver ) {
47
50
return new ProblemAccessDeniedHandler (resolver );
48
51
}
49
52
}
You can’t perform that action at this time.
0 commit comments