Getting “No message available” error with Spring Boot + REST application

后端 未结 10 2458
感动是毒
感动是毒 2020-12-30 02:02

I have created demo Spring Boot project and implemented Restful services as shown here

@RestController
public class GreetingsController {
    @RequestMappin         


        
10条回答
  •  执念已碎
    2020-12-30 02:24

    Actually you need to put the Controller package under same path as your SpringBootApplication java file (spring boot main java class) contains.

    com.abc | |---- @SpringBootApplication main java class

    com.abc.controller | |---- @RestController class

提交回复
热议问题