Skip to content

Commit 8db74b5

Browse files
committed
refactor securityconfig
1 parent 3071fe9 commit 8db74b5

File tree

2 files changed

+6
-19
lines changed

2 files changed

+6
-19
lines changed

src/main/java/com/myapp/auth/SecurityConfig.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@
2020
@Order(1)
2121
public class SecurityConfig extends WebSecurityConfigurerAdapter {
2222

23-
@Autowired
24-
private UserService userService;
23+
final private UserService userService;
2524

26-
@Autowired
27-
private TokenAuthenticationService tokenAuthenticationService;
25+
final private TokenAuthenticationService tokenAuthenticationService;
2826

29-
public SecurityConfig() {
27+
@Autowired
28+
public SecurityConfig(UserService userService, TokenAuthenticationService tokenAuthenticationService) {
3029
super(true);
30+
this.userService = userService;
31+
this.tokenAuthenticationService = tokenAuthenticationService;
3132
}
3233

3334
@Override

src/test/groovy/com/myapp/repository/BaseRepositoryTest.groovy

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)