Eclipse - Springboot
4817 단어 Java
컨디션
※ Pleiades All in one
Eclipse에 STS 추가
Spring Tools4 설치




Eclipse 효과 표시



프로젝트 작성



pom.xml
<properties>
<java.version>1.8</java.version>
<!-- 下の1行を追加する -->
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
</properties>
동작 확인
Controller 만들기
HelloController.java
package com.example.demo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class HelloContoller {
@RequestMapping("/")
public String hello() {
return "hello";
}
}
HTML 만들기
hello.html<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Spring demo</title>
</head>
<body>
<h1>Hello</h1>
</body>
</html>
도구 모음 실행 에서 실행→Spring boot 응용 프로그램 을 선택하고 http://localhost:8080탭
Reference
이 문제에 관하여(Eclipse - Springboot), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/kotaroxx0909xx/items/fec541024168748ac490
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
package com.example.demo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class HelloContoller {
@RequestMapping("/")
public String hello() {
return "hello";
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Spring demo</title>
</head>
<body>
<h1>Hello</h1>
</body>
</html>
Reference
이 문제에 관하여(Eclipse - Springboot), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/kotaroxx0909xx/items/fec541024168748ac490텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)