Problem Description:
The use of @restcontroller in spring boot does not work, does not return JSON, still look for the interface of the request address corresponding page
Performance results:
1 "Using the Postman Test interface, the performance of the return is 404, the corresponding page address is not found." 2 "docking front desk, access directly return system exception!!
Workaround:
The final reason is that the controller layer is inherited from the interface layer. Like a service, there is a service interface layer that has a SERVICEIMPL implementation layer. Controller is the same structure, one is the interface layer, and the other is the implementation layer. Before, such interface access interface, return the results are no problem, now access to this problem. So cancel the interface layer and write the @restcontroller@requestmapping ("/ten/goodstype") public class tengoodstypeapiimpl{} directly above the implementation layer, Interface above directly specify the request address and method can be @requestmapping (value = "Insert", method = requestmethod.post) public ajaxresult< goodstype> Insert (@RequestBody goodstype entity) {}
The cause of this problem has not yet been identified, if there is a similar situation, hope to inform!!! Thank you!!!
"Spring Boot" Spring boot uses @restcontroller does not work, does not return JSON, still to find the interface of the request address corresponding page