在对应的Controller上的requestMapping中添加:

@RestController
@EnableAutoConfiguration
@RequestMapping(value = "/", produces = "application/json; charset=utf-8")
public class hello {
 @RequestMapping("/")
 public String home() {
   return "Hisdfds士大夫";
 }

 public static void main(String[] args) {
   SpringApplication.run(hello.class, args);
 }
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-27
  • 2021-05-25
  • 2022-12-23
  • 2021-08-08
  • 2022-02-21
猜你喜欢
  • 2022-12-23
  • 2021-09-19
  • 2021-05-22
  • 2022-12-23
  • 2021-12-26
  • 2022-03-06
  • 2022-12-23
相关资源
相似解决方案