The type that you’re supposed to be returning is in the error message . findById() returns an Optional<MappingModel>, so you can either change the return type of your service to Optional<MappingModel> or you can handle the Optional in the service.
https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html
Edit to provide questioner more information about Optionals:
As a programmer, you've probably had faced the dreaded NullPointerException thousands of times. A big problem with Java is that when you look at a parameter, it's really hard to tell if it can be null or if it's guaranteed to be there, so what usually ends up happening is that your entire code base is filled with null checks (this is especially bad with nested objects).
Optionals are a way of explicitly saying, this object has a possibility that it's null, you need to account for that in some way. This might seem like a small thing, but it's actually very powerful for several reasons.
If you're consistent with your use of Optionals in your code base, then you can mostly eliminate the dreaded null-check. If you always use an optional when something could be null, then you are implying that everything that is not an optional, is not null, so any nullpointers that you get are a result of a logical error in your code (which you know that you need to fix).
Optionals work really well with the stream API. This is too big a topic to cover here, but basically, many program flows are quite simple. If we have the item, we attempt to do a sequence of operations to it, but if it's not, then we don't or throw an exception. Try it out, you'll appreciate Optionals a lot more after you do. I think it leads to really readable code.
Many packages support Optionals, so they might handle them for you. For example, if this object is present, then we will return it as part of a JSON response. Otherwise, we'll ignore it.
From a use-case perspective, think about what it feels like to work with Collections like Lists. We usually expect that the List is never null, just empty, so using them just feels nice. Optionals are somewhat like an extension of this (and many of the stream API methods are overloaded to handle both Collections and Optionals).