A Spring Boot application must support both REST JSON clients and legacy SOAP clients for the same business logic. What is the recommended architecture?
-
A
Duplicate the service layer for each protocol
-
B
Expose a @RestController and a @Endpoint (Spring-WS) both delegating to a shared @Service
-
C
Use Spring MVC content negotiation to switch between JSON and XML/SOAP
-
D
Configure two separate Spring Boot applications