File tree Expand file tree Collapse file tree
spring-security-rest/src/main/java/org/baeldung/spring Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323@ ComponentScan ("org.baeldung.security" )
2424public class SecurityJavaConfig extends WebSecurityConfigurerAdapter {
2525
26- @ Autowired
27- private PasswordEncoder encoder ;
28-
2926 @ Autowired
3027 private CustomAccessDeniedHandler accessDeniedHandler ;
3128
@@ -45,9 +42,9 @@ public SecurityJavaConfig() {
4542 @ Override
4643 protected void configure (final AuthenticationManagerBuilder auth ) throws Exception {
4744 auth .inMemoryAuthentication ()
48- .withUser ("admin" ).password (encoder .encode ("adminPass" )).roles ("ADMIN" )
45+ .withUser ("admin" ).password (encoder () .encode ("adminPass" )).roles ("ADMIN" )
4946 .and ()
50- .withUser ("user" ).password (encoder .encode ("userPass" )).roles ("USER" );
47+ .withUser ("user" ).password (encoder () .encode ("userPass" )).roles ("USER" );
5148 }
5249
5350 @ Override
You can’t perform that action at this time.
0 commit comments