0
我正在嘗試學習使用SpringBoot部署簡單的REST服務。以下是我正在使用的類文件。使用Springboot部署REST服務:whitelabel error
@SpringBootApplication
public class App {
public static void main(String[] args) {
SpringApplication.run(App.class, args);
int a= 5;
int b=10;
Addition.addR(a, b);
}
}
和
@RestController
@RequestMapping(value="/spring/examples")
public class Addition {
@RequestMapping(value="/", method= RequestMethod.GET)
public static String addR(int a, int b){
String c ;
c= a + b + " = Addition of two Numbers";
return c;
}
}
當我運行的主類,我得到一個錯誤:
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
任何指針,以什麼造成的呢?