웹 소켓 엔트리 springboot을 시작하십시오

package com.tx;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@EnableAutoConfiguration
public class SampleController {

    @RequestMapping("/")
    @ResponseBody
    String home() {
        return "Hello World!";
    }

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

}

첫번째 직접 입력을 시작 springboot

참조 문서 : https://docs.spring.io/spring-boot/docs/2.2.1.RELEASE/reference/html/getting-started.html#getting-started-first-application

게시 된 149 개 원래 기사 · 원 찬양 8 ·은 70000 +를 볼

추천

출처blog.csdn.net/bluewelkin/article/details/102969584