본문 바로가기
Java Web/Spring Boot

[Spring Boot] Gradle 빌드 라이브러리 의존성 추가

by 스응 2023. 4. 14.
728x90
728x90

#  AOP 라이브러리

  - https://young0105.tistory.com/192

 

1
2
3
4
5
6
dependencies {            // 그룹 아이디     :     아티팩트 아이디
    implementation 'org.springframework.boot:spring-boot-starter-aop' // AOP
 
    ... // 나머지
}
 
cs

 

#  Validation 라이브러리

  - https://young0105.tistory.com/194

 

1
2
3
4
5
6
dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-validation'  // Validation
 
    ... // 나머지
}
 
cs

 

#  JSP 템플릿 엔진 라이브러리 + JSTL 라이브러리

  - https://young0105.tistory.com/197

 

1
2
3
4
5
6
7
dependencies {
    implementation 'org.apache.tomcat.embed:tomcat-embed-jasper' // JSP
    implementation 'javax.servlet:jstl' // JSTL
 
    ... // 나머지
}
 
cs

 

#  MyBatis 라이브러리

  - SQL mapper 프레임워크

  - 객체와 SQL 쿼리를 매핑하여, 개발자가 SQL 쿼리를 직접 작성하지 않아도 DB에 접근할 수 있게 지원

  - MyBatis와 MyBatis-Spring 연동을 자동으로 설정해줌

 

1
2
3
4
5
6
dependencies {
    implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.3.0'
 
    ... // 나머지
}
 
cs

 

#  H2 Database 라이브러리

  - 프로젝트 생성 시 체크하면 자동 생성

  - Java 기반의 RDBMS인 H2 Database를 제공함

  - 인메모리 데이터베이스

      : 디스크/파일시스템 대신, 주 메모리(RAM)에 데이터를 저장/조회/수정하는 데이터베이스

      · 디스크에 저장되지 않아, DB의 I/O 작업이 없음

          → 빠른 속도로 데이터 처리 가능

      · 메모리에 저장됨

          → 영속성을 가지지 않음

               : RAM은 휘발성 메모리이므로, 애플리케이션이 종료되면 데이터가 모두 초기화됨

      · 개발/테스트용 DB로 유용함

  - 서버를 시작한 후, localhost:포트번호/h2-console로 들어가면 DB를 확인할 수 있음

 

 

1
2
3
4
5
6
dependencies {
    runtimeOnly 'com.h2database:h2'
 
    ... // 나머지
}
 
cs

 

  - runtimeOnly

      · Gradle에서 라이브러리 의존성을 추가할 때 사용하는 키워드

      · 빌드 시에는 불필요하지만, 런타임(실행) 시에만 해당 라이브러리가 필요한 경우에 사용됨

 

320x100
반응형

'Java Web > Spring Boot' 카테고리의 다른 글

[Spring Boot] 프로젝트 초기 세팅  (0) 2023.04.14
[Spring Boot] yml 파일  (0) 2023.04.14
[Spring Boot] 세션 (Session)  (0) 2023.04.13
[Spring Boot] 인터셉터 (Interceptor) ★  (0) 2023.04.13
[Spring Boot] 필터 (Filter)  (0) 2023.04.12

댓글