title: MapStruct - No converter found for return value of type
body: <p>I want to use records from java 14 with entity (from java persistence). I try to map my user to userDto and my debbuger show that all is correct mapped. But unfortunettly I got the error when I want to print my userDto: </p>
  
  <p><code>Resolved [org.springframework.http.converter.HttpMessageNotWritableException: No converter found for return value of type: class xxx.UserMicroservice.dto.UserDto]</code></p>
  
  <p>What I'm doing wrong?</p>
  
  <pre><code>public interface UserMapper {
      UserMapper INSTANCE = Mappers.getMapper(UserMapper.class);
  
      UserDto mapToUserDto(User user);
  }
  </code></pre>
  
  <pre><code>
  public class UserMapperImpl implements UserMapper {
  
      @Override
      public UserDto mapToUserDto(User user) {
          if(user == null) {
              return null;
          }
          UserDto userDto = new UserDto(user.getName(), user.getEmail(), user.getImageUrl());
          return userDto;
      }
  
  }
  </code></pre>
  
  <pre><code>public record UserDto(
          String name,
          String email,
          String imageUrl) {}
  </code></pre>
  
  <pre><code>@RestController
  public class UserController {
  
      @Autowired
      private UserRepository userRepository;
  
      @GetMapping("/user/me")
      @PreAuthorize("hasRole('USER')")
      public UserDto getCurrentUser(@CurrentUser UserPrincipal userPrincipal) {
          UserDto userDto = UserMapper.INSTANCE.mapToUserDto(userRepository.findById(userPrincipal.getId())
                  .orElseThrow(() -&gt; new ResourceNotFoundException("User", "id", userPrincipal.getId())));
          return userDto;
      }
  }
  </code></pre>