Spring boot 梳理 - 配置eclipse集成maven,并开发Spring boot hello

  1. @RestController
    @EnableAutoConfiguration
    public class App 
    {
        @RequestMapping("/hello")
        public HashMap<String,String> hello(){
            HashMap<String,String> result=new HashMap<String,String>();
            result.put("name", "jt");
            return result;
            
        }
        public static void main( String[] args )
        {
            SpringApplication.run(App.class, args);
        }
    }

     

posted on 2018-12-15 22:18  手握太阳  阅读(169)  评论(0编辑  收藏  举报

导航