с нереактивной безопасностью это было просто, например, < /p>
Код: Выделить всё
var customUserDto = Optional.ofNullable(getCurrentUserAuthentication()).map(Authentication::getPrincipal)
.filter(CustomUserDetails.class::isInstance).map(CustomUserDetails.class::cast).orElse(null);
< /code>
Я попытался сделать то же самое следующий: < /p>
String username = ReactiveSecurityContextHolder.getContext().map(SecurityContext::getAuthentication)getCurrentUserAuthentication().map(Authentication::getName);
var userInfo = userInfoRepository.findByEmail(username.block()).orElse(null);
Можно ли решить или я должен использовать всю нереактивную пружину из-за db?
заранее спасибо. < /p>
Подробнее здесь: https://stackoverflow.com/questions/794 ... a-database