Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Android Admob Test ID
- Android 값전달
- Android 광고
- Android Fragment Sample
- Android 화면 꺼짐 방지
- Android Progressbar
- Basic Android
- mac java
- 애플워치 완충
- 현재 버전
- Admob Banner
- Android Intent Bundle Data
- Android
- Android Button 대문자
- Android LiveData
- Android 프로젝트명 변경
- Kotlin 형변환
- Android Jcenter
- 혼자 만들었다!
- Android Intent Bundle
- 아이폰 알림 워치
- Android 외부브라우저
- Basic Fragment
- Chrome Dark
- Android Bundle
- Android Intent data
- 애플워치
- Android Jcenter Warning
- 페이스아이디 마스크
- Chrome Dark Mode
Archives
- Today
- Total
배고파
SpringBoot - 프로젝트 만들기 본문
Eclipse 사용.
build.gradle
plugins {
id 'org.springframework.boot' version '2.2.2.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id 'java'
id 'war'
}
group = 'com.study'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
bootWar.enabled = false
war.enabled = true
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
implementation 'javax.servlet:jstl'
implementation 'org.apache.tomcat.embed:tomcat-embed-jasper'
implementation 'mysql:mysql-connector-java:5.1.34'
}
test {
useJUnitPlatform()
}
application.properties
server.port=8092
#JSP 설정
spring.mvc.view.prefix=/WEB-INF/views/
spring.mvc.view.suffix=.jsp
#DB 설정
spring.datasource.url=jdbc:mysql://localhost/myapp
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
MyController.java
package com.study.springboot;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class MyController {
@RequestMapping("/")
public @ResponseBody String root() throws Exception{
return "This Project is 8092 ..";
}
}
완료. !