@Bean
public MessageSource messageSource() {
ReloadableResourceBundleMessageSource messageSource
= new ReloadableResourceBundleMessageSource();
messageSource.setBasename("classpath:messages");
messageSource.setDefaultEncoding("UTF-8");
return messageSource;
}
@Bean
public LocalValidatorFactoryBean getValidator() {
LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean();
bean.setValidationMessageSource(messageSource());
return bean;
}email.notempty=Order name required@NotEmpty(message = "{email.notempty}")
private String orderName;
package config;src/main/java/com/example/securingweb/WebSecurityConfig.java/src/main/java/com/example/securingweb/SecuringWebApplication.java@ComponentScan

// App Id - 08f1861f20c248c09ee0a7f6daa9be5f
// Latest - https://openexchangerates.org/api/latest.json?app_id=08f1861f20c248c09ee0a7f6daa9be5f&symbols=Rub
// Yesterday -https://openexchangerates.org/api/historical/<DATE>.json?app_id=08f1861f20c248c09ee0a7f6daa9be5f&symbols=rub

Converter<S,T>if (socks.getQuantity() <= 0
|| socks.getColor().equals("")
|| socks.getCottonPart() < 0) {
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
}if (!isDataBaseConnected()) {
return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
}if(socks.getOperation().equals("moreThan")) {
socksList.removeIf(s -> s.getCottonPart() <= socks.getCottonPart() || !s.equals(socks));
} else if(socks.getOperation().equals("lessThan")) {
socksList.removeIf(s -> s.getCottonPart() >= socks.getCottonPart() || !s.equals(socks));
} else {
socksList.removeIf(s -> !s.equals(socks));
}void configure(AuthenticationManagerBuilder auth) используете NoOpPasswordEncoder.getInstance(). Если вы используете NoOpPasswordEncoder, то пароли в flyway подойдут, так как не захешированы. Но я в файле увидел бин BCryptPasswordEncoder и таки добавил хеширование.User implements UserDetails и это Role implements GrantedAuthority и это UserService implements UserDetailsService
Кстати, также обратите внимание на метод
intern(), при использовании которого для указанного String выделяется отдельная ячейка памяти в пуле строк