eclipse 에서 springboot 프로젝트 를 만 드 는 세 가지 방식 요약
5081 단어 eclipse창설springboot
STS 플러그 인 설치
플러그 인 가이드 창 설치 완료 후 eclipse 오른쪽 아래 에 플러그 인 설치 진도 가 나타 납 니 다.플러그 인 설치 가 완료 되면 eclipse 를 다시 시작 합 니 다.
새 spring boot 항목
프로젝트 시작
방법 2
1.Maven 프로젝트 만 들 기
2.항목 유형 선택
3.항목 선택
4.프로젝트 그룹 과 이름-finish 를 작성 하면 됩 니 다.
5.pom.xml 파일 수정
<!-- spring boot -->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.2.RELEASE</version>
</parent>
6.pom.xml 에 의존 추가
<!--web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
7.pom.xml 에 컴 파일 플러그 인 추가
<build>
<plugins>
<!-- spring-boot-maven-plugin spring boot -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins
</build>
8.기본 패키지 와 클래스
9.resources 폴 더 와 application.properties 파일 만 들 기
10.App.java
package com.springboot.springbootDemo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class App
{
public static void main( String[] args )
{
SpringApplication.run(App.class, args);
}
}
11.HelloController.java
package com.springboot.springbootDemo.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("hello2")
public class HelloController {
@RequestMapping("")
public String hello() {
return "helloworld2";
}
}
12.시작 항목
13.항목 에 접근(낮은 버 전 으로 접근 할 수 없 을 수도 있 고,2 버 전 으로 사용 가능)
http://localhost:8012/hello2
방법
방문 하 다.http://start.spring.io/
Generate Project 를 누 르 면 프로젝트 압축 패 키 지 를 다운로드 합 니 다.
압축 해제 후,eclipse,Import->Existing Maven Projects->Next->압축 해제 후 폴 더 선택->Finsh,OK done!
이상 은 개인 적 인 경험 이 므 로 여러분 에 게 참고 가 되 기 를 바 랍 니 다.여러분 들 도 저 희 를 많이 응원 해 주시 기 바 랍 니 다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
m1 이클립스에 oracle cloud (오라클 클라우드)연결하기m1에는 oracle이 설치되지 않는다.... 큰맘먹고 지른 m1인데 oracle이 설치되지 않는다니... 하지만 이뻐서 용서가 된다. 이거 때문에 웹 개발 국비수업을 듣는 도중에 몇번 좌절하고 스트레스를 크게 받았...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.