plugins { id "com.github.node-gradle.node" version "3.1.1" } node { download = true version = "14.6.0" npmVersion = "6.14.7" distBaseUrl = "https://nodejs.org/dist" npmInstallCommand = "install" workDir = file("${project.projectDir}/.gradle/nodejs") npmWorkDir = file("${project.projectDir}/.gradle/npm") nodeProjectDir = file('./front') } task setUp(type: NpmTask) { description = "Install Node.js Packages" args = ['install'] } task buildFrontEnd(type: NpmTask, dependsOn: setUp) { description = "build Vue" args = ['run', 'build'] } sourceSets { main { resources { srcDir './src/resources/static' } } } processResources.dependsOn 'buildFrontEnd'
build.gradle 전체
plugins { id 'org.springframework.boot' version '2.5.6' id 'io.spring.dependency-management' version '1.0.11.RELEASE' id 'java' id "com.github.node-gradle.node" version "3.1.1" id 'war' } group = 'com.example' version = '0.0.1-SNAPSHOT' sourceCompatibility = '1.8' node { download = true version = "14.6.0" npmVersion = "6.14.7" distBaseUrl = "https://nodejs.org/dist" npmInstallCommand = "install" workDir = file("${project.projectDir}/.gradle/nodejs") npmWorkDir = file("${project.projectDir}/.gradle/npm") nodeProjectDir = file('./front') } task setUp(type: NpmTask) { description = "Install Node.js Packages" args = ['install'] } task buildFrontEnd(type: NpmTask, dependsOn: setUp) { description = "build Vue" args = ['run', 'build'] } sourceSets { main { resources { srcDir './src/resources/static' } } } processResources.dependsOn 'buildFrontEnd' configurations { compileOnly { extendsFrom annotationProcessor } all { exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging' } } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-web-services' implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.2.0' implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect' /* Thymeleaf Layout */ compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' runtimeOnly 'com.h2database:h2' runtimeOnly 'mysql:mysql-connector-java' annotationProcessor 'org.projectlombok:lombok' providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat' testImplementation 'org.springframework.boot:spring-boot-starter-test' implementation 'org.springframework.boot:spring-boot-starter-log4j2' implementation 'org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4.1:1.16' } test { useJUnitPlatform() }
'프로그래밍 > Java' 카테고리의 다른 글
java spring boot db 연결시 java.lang.NullPointerException: null 발생할때 (0) | 2021.12.13 |
---|---|
Log4j2 취약점 해결 : 보안 업데이트 (0) | 2021.12.13 |
intellij thymeleaf 재시작 없이 실시간 반영 (0) | 2021.11.18 |
스프링부트(spring boot) mysql 연동시 log4j2 설정 gradle intellij (0) | 2021.11.17 |
스프링부트(spring boot) mybatis 에러 해결 invalid bound statement not found (0) | 2021.11.17 |