File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
spring-security-login-and-registration/src/main/java/org/baeldung Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ public class UserService implements IUserService {
2424 @ Autowired
2525 private PasswordEncoder passwordEncoder ;
2626
27+ // API
28+
2729 @ Override
2830 public User registerNewUserAccount (UserDto accountDto ) throws EmailExistsException {
2931 if (emailExist (accountDto .getEmail ())) {
Original file line number Diff line number Diff line change 1616public class SecSecurityConfig {
1717
1818 @ Autowired
19- UserDetailsService userDetailsService ;
19+ private UserDetailsService userDetailsService ;
2020
2121 public SecSecurityConfig () {
2222 super ();
2323 }
2424
25- @ Bean
26- public BCryptPasswordEncoder encoder () {
27- BCryptPasswordEncoder encoder = new BCryptPasswordEncoder (11 );
28- return encoder ;
29- }
25+ // beans
3026
3127 @ Bean
3228 public DaoAuthenticationProvider authProvider () {
@@ -37,8 +33,8 @@ public DaoAuthenticationProvider authProvider() {
3733 }
3834
3935 @ Bean
40- public PasswordEncoder passwordEncoder () {
41- return new BCryptPasswordEncoder ();
36+ public PasswordEncoder encoder () {
37+ return new BCryptPasswordEncoder (11 );
4238 }
4339
4440}
You can’t perform that action at this time.
0 commit comments