1. Eclipse marketplace에서 Spring tools4 설치 

 

2. Spring Starter Project 선택 

 

 

3. 프로젝트 생성 

 

3. Spring 의존성 추가 

 

4. code 

package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SpringBootApplication
public class DemoApplication {

	@RequestMapping("/")
	public String index() {
		return "Springboot Hello World";
	}
	
	public static void main(String[] args) {
		SpringApplication.run(DemoApplication.class, args);
	}

}

 

5. 접속 

http://localhost:8080/ 

 

 

블로그 이미지

나무뚱이

,