Merge branch 'dev'

dev
minuk926 3 years ago
commit a54de69b79

@ -13,9 +13,6 @@ buildscript {
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
// JPA querydsl
//classpath("gradle.plugin.com.ewerk.gradle.plugins:querydsl-plugin:1.0.10")
}
}
@ -25,14 +22,6 @@ plugins {
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
id 'war'
//id 'net.ltgt.apt' version '0.21'
// querydsl
id 'com.ewerk.gradle.plugins.querydsl' version '1.0.10'
//id 'org.openapi.generator' version '5.1.1'
// docker : jib
// bootWar --> jibDockerBuild
//id 'com.google.cloud.tools.jib' version '3.1.2' //
}
// buildscript
@ -125,16 +114,18 @@ dependencies {
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0'
// implementation 'p6spy:p6spy:3.9.1'
// JPA querydsl
implementation "com.querydsl:querydsl-jpa:${queryDslVersion}"
implementation "com.querydsl:querydsl-core:${queryDslVersion}"
implementation "com.querydsl:querydsl-apt:${queryDslVersion}"
annotationProcessor(
"javax.persistence:javax.persistence-api",
"javax.annotation:javax.annotation-api",
"com.querydsl:querydsl-apt:${queryDslVersion}:jpa")
// JPA mapstruct : lombok - mapstruct
// JPA querydsl ----------------------------------------------
implementation "com.querydsl:querydsl-jpa"
// querydsl JPAAnnotationProcessor
annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jpa"
// java.lang.NoClassDefFoundError(javax.annotation.Entity)
annotationProcessor "jakarta.persistence:jakarta.persistence-api"
// java.lang.NoClassDefFoundError (javax.annotation.Generated)
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
// ------------------------------------------------------------
// JPA mapstruct -----------------------------------------------------------
// lombok - mapstruct
// target class @Builder + setter Mapper Generation
// @NoArgsConstructor, @Setter
// but, Setter mapstruct @Builder Generation
@ -267,52 +258,21 @@ tasks.withType(JavaCompile) {
//-----------------------------------------------------------------------------------//
// querydsl
//-----------------------------------------------------------------------------------//
def querydslDir = "$buildDir/generated"
// querydsl
sourceSets {
main {
java {
srcDirs = ["$projectDir/src/main/java", querydslDir]
}
}
}
querydsl {
jpa = true
querydslSourcesDir = querydslDir
/** clean 태스크 실행시 QClass 삭제 */
/**
* Intellij IDEA - Build, Execution, Deployment - Build tools Gradle Build and run Annotation processor
* Gradle: build/generated/sources/annotationProcessor/java/main
* Q clean
* IntellijI IDEA: src/main/generated
* Compiler Annotation procesoors
* Q , Q
* Build, Execution, Deployment - Compiler -> Enable annotaion processing
*/
clean {
delete file('src/main/generated') // Annotation processor
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
querydsl.extendsFrom compileClasspath
}
compileQuerydsl {
options.annotationProcessorPath = configurations.querydsl
}
// build querydsl
compileQuerydsl.doFirst {
if(file(querydslDir).exists())
delete(file(querydslDir))
}
// build querydsl
compileJava {
options.compilerArgs << '-s'
options.compilerArgs << "$buildDir/generated/"
doFirst {
if(file(querydslDir).exists())
delete(file(querydslDir))
file(querydslDir).mkdirs();
}
}
//-----------------------------------------------------------------------------------//
test {
exclude '**/*'
//useJUnitPlatform()

@ -27,23 +27,5 @@ public class XitFrameworkApplicationCommandLineRunner implements CommandLineRunn
//System.out.println(new SCryptPasswordEncoder().encode("gnadmin"));
//System.out.println(new DelegatingPasswordEncoder().encode("gnadmin", ""));
//System.out.println(new Pbkdf2PasswordEncoder().encode("gnadmin"));
String url = "jdbc:oracle:thin:@211.119.124.118:1521:bustms";
String username = "traffic";
String password = "xhdgkq0";
System.out.println(jasyptEncoding(url));
System.out.println(jasyptEncoding(username));
System.out.println(jasyptEncoding(password));
}
private String jasyptEncoding(String value) {
String key = "xit_jasypt_key";
StandardPBEStringEncryptor pbeEnc = new StandardPBEStringEncryptor();
pbeEnc.setAlgorithm("PBEWithMD5AndDES");
pbeEnc.setPassword(key);
return pbeEnc.encrypt(value);
}
}

@ -6,7 +6,7 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
@SpringBootTest
@ActiveProfiles(value="dev")
//@ActiveProfiles(value="dev")
class JasyptApplicationTests {
@Test

Loading…
Cancel
Save