ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [SPRINGBOOT] Gradle 설정
    IT개발이야기 2023. 1. 13. 15:32
    728x90
    반응형
    SMALL

    프로젝트를 통해 먼저 스프링부트를 접하기 시작하였고, 개인적으로 github에 연동하면서 설정을 시작하였다.

    스프링부트 프로젝트를 처음 했을 때는 개발 위주로 하였고, 설정 자체는 하지 않았다.

    그래서 그런지 스프링에서 하던 개발은 비슷하나, 설정을 이해하지 못하고 계속 겉돌기만 하였다.

     

    Gradle 설정부터 했던 설정들을 공유하고자 한다.

    소스는 github에 업로드하였습니다.

     

    https://github.com/dinamic1/SpringBoot_Thymeleaf.git

     

    GitHub - dinamic1/SpringBoot_Thymeleaf

    Contribute to dinamic1/SpringBoot_Thymeleaf development by creating an account on GitHub.

    github.com

     

    먼저, Gradle 설정부터 공유드립니다.

    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
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    buildscript {
        ext {
            springBootVersion = '2.1.9.RELEASE'
        }
        repositories {
            mavenCentral()
            mavenLocal()
            jcenter() 
            
        }
        dependencies {
            classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
        }
    }
     
    apply plugin: 'java'
    apply plugin: 'eclipse'
    apply plugin: 'org.springframework.boot'
    apply plugin: 'io.spring.dependency-management'
     
    group = 'com.domiworld'
    version = '0.0.1-SNAPSHOT'
    sourceCompatibility = '1.8'
     
    repositories {
        mavenCentral()
        mavenLocal()
        jcenter()
    }
     
    dependencies {
        implementation 'org.springframework.boot:spring-boot-starter-web' 
        implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
        testImplementation 'org.springframework.boot:spring-boot-starter-test' 
        implementation 'org.springframework.boot:spring-boot-starter-jdbc'
        implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' 
        compileOnly 'org.projectlombok:lombok'
        annotationProcessor 'org.projectlombok:lombok'
        implementation fileTree(dir: 'src/main/resources/static/lib', include: '*.jar')
        runtimeOnly 'com.h2database:h2:1.4.197'
        implementation "com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.6.1"  // 쿼리의 실제 파라미터 보여주기
        testImplementation 'junit:junit'
        runtimeOnly 'org.postgresql:postgresql'
        implementation 'org.hibernate:hibernate-entitymanager:5.2.3.Final'
        implementation 'javax.xml.bind:jaxb-api:2.3.0'
        implementation group: 'org.javassist', name: 'javassist', version: '3.15.0-GA'
        // mybatis
        implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
        implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.4' // 버전 2.1.4 이하만 됨. springboot 는 mybatis를 지원안함.
        implementation 'org.springframework:spring-jdbc:5.1.3.RELEASE'
        
    }
     
     
    cs
    728x90
    반응형
    LIST

    댓글

Designed by Tistory.