RestController with Annotations at the Service Interface is not working in native Mode #955
Comments
@goafabric Could you test if this is still an issue with |
@sdeleuze yes sure, can do that,thx |
@sdeleuze because of the breaking change concerning unit tests, i cannot test this currently easily, you might close the ticket for now and i will check it later on ... |
@sdeleuze Nope does not seem to work .. same exception with spring native 11.0-M1 + Spring Boot 2.6.0-M1 Additionally Spring Security now seems to be brokenorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChain': Unexpected exception during bean creation; nested exception is java.lang.RuntimeException: Authentication event class org.springframework.security.authentication.event.AuthenticationFailureBadCredentialsEvent has no suitable constructorAs well springdoc-openapi-ui .. which now complains about a missing Property(PlaceHolder) ... However wont raise issues for this, as this is an M1 |
Please provide a repro for this using |
@sdeleuze thx for your time and support .. Service Interface seems to work with 0.11.0-RC1 and for the Spring Security Problem we already have another issue .. so i think you can close this one one more thing, concerning #949 I added another comment after it's closed, at least with 10.4 the issue is till open for me thx again for your time and effort for everything spring native, |
Imagine an interface and an Implementing Restcontroller Class like below.
While everything works like a charm in JVM mode and I've been using this for years,
its not working in native mode.
The Application crashes with the Exception below:
org.springframework.http.converter.HttpMessageNotWritableException: No converter for [class org.goafabric.calleeservice.service.Callee] with preset Content-Type 'null'
Calle is just a simple Pojo ....
--- Interface ---
@RequestMapping(value = "callees", produces = MediaType.APPLICATION_JSON_VALUE)
public interface CalleeService {
@GetMapping("sayMyName")
Callee sayMyName (@RequestParam String name);
}
--- Implementing class ---
And an implementing class
@RestController
public class CalleeServiceBean implements CalleeService {
@Autowired
CalleeLogic calleeLogic;
}
--- Complete Exception ---
org.springframework.http.converter.HttpMessageNotWritableException: No converter for [class org.goafabric.calleeservice.service.Callee] with preset Content-Type 'null'
at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:312) ~[na:na]
at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.handleReturnValue(RequestResponseBodyMethodProcessor.java:183) ~[na:na]
at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:78) ~[na:na]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:124) ~[na:na]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) ~[org.goafabric.calleeservice.Application:5.3.9]
The text was updated successfully, but these errors were encountered: