File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
spring-security-rest/src/main/java/org/baeldung/spring Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 23
23
@ ComponentScan ("org.baeldung.security" )
24
24
public class SecurityJavaConfig extends WebSecurityConfigurerAdapter {
25
25
26
- @ Autowired
27
- private PasswordEncoder encoder ;
28
-
29
26
@ Autowired
30
27
private CustomAccessDeniedHandler accessDeniedHandler ;
31
28
@@ -45,9 +42,9 @@ public SecurityJavaConfig() {
45
42
@ Override
46
43
protected void configure (final AuthenticationManagerBuilder auth ) throws Exception {
47
44
auth .inMemoryAuthentication ()
48
- .withUser ("admin" ).password (encoder .encode ("adminPass" )).roles ("ADMIN" )
45
+ .withUser ("admin" ).password (encoder () .encode ("adminPass" )).roles ("ADMIN" )
49
46
.and ()
50
- .withUser ("user" ).password (encoder .encode ("userPass" )).roles ("USER" );
47
+ .withUser ("user" ).password (encoder () .encode ("userPass" )).roles ("USER" );
51
48
}
52
49
53
50
@ Override
You can’t perform that action at this time.
0 commit comments