| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- after-throwing
- spring
- .xml
- @RequestMapping
- 유효성검사
- springjdbc
- produces
- @Valid
- Model
- @
- gradle
- @RequestParam
- 생성자주입
- AOP
- 비즈니스레이어
- application.properties
- MVC
- jointpoint
- PointCut
- 서비스레이어
- 의존주입
- 스프링
- frontController
- 바인딩변수
- SpringBoot
- 어노테이션
- Java
- springmvc
- c:if
- @ResponseBody
- Today
- Total
메모장
Spring Starter Project ( Spring boot ) 본문
Spring Starter Project
이제 starter Project 를 살펴 보면

java -> resources 영역에 static 과 application.properties 가 보이는데 이것이 기존 Spring 과 다른 점이다.
1. static
정적 resource 를 넣는 곳이다.
정적 리소스 란 ? HTML , CSS , JS(자바 스크립트), 파일 등이 정적 리소스 이다.
↕
반대로 동적 리소스는 어디서 보관 할까 ?
src/
2. application.properties
Spring 에서는 .xml 로 끝나는 것들이 설정 파일 이었는데
Spring boot 에서는 .properties 로 끝나는 것들이 설정 파일 이다.
해당 프로젝트 전반에 대한 설정 파일이다.
우리가 제일 처음 설정 해볼 것은
서버. 포트 번호 = 8088 로 바꿔줘

정리

Spring 에서는 Maven 이 라이브러리를 관리했다면
부트 에서는 gradle 이라는 자동화 도구가 설정을 한다.

< gradle >
plugins {
id 'java'
id 'war'
id 'org.springframework.boot' version '3.1.3'
id 'io.spring.dependency-management' version '1.1.3'
}
group = 'com.hong'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '17'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
tasks.named('test') {
useJUnitPlatform()
}
우리가 web starter 를 넣어주고 시작했으니 implements 되어있는것을 볼 수 있다.
dependencies 에 들어가있다.
Spring 에선 dependency 를 설정 해줄 때 마다 그것에 해당하는 코드를 구글링 해서 찾았다면
dependencies 한 줄로 끝이고 버전도 자동으로 관리 해주고 있다.
요약
Maven 이 아니라 요즘 바꾸고 있는 gradle 을 썼고 이것이 자동화 도구 이름 이고
이제 라이브러리를 내가 관리 하는것이 아니라 관리도 자동으로 해준다.
서버는 내장 서버인 톰캣을 사용하였다.
'Spring > 개념정리' 카테고리의 다른 글
| Spring boot 의 static 폴더 (0) | 2024.08.07 |
|---|---|
| Spring boot 에서 해야하는 기본 설정 (0) | 2024.08.07 |
| 다국어 처리 (0) | 2024.08.07 |
| Spring 비동기 처리 에러 이슈 (한글 깨짐,인코딩) (0) | 2024.08.07 |
| Spring 비동기 처리 (별도의 lib 없이) (0) | 2024.08.07 |