Merge branch 'dev'

dev
minuk926 3 years ago
commit a54de69b79

@ -13,9 +13,6 @@ buildscript {
dependencies { dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion") 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 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java' id 'java'
id 'war' 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 // buildscript
@ -125,16 +114,18 @@ dependencies {
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0' implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.0'
// implementation 'p6spy:p6spy:3.9.1' // implementation 'p6spy:p6spy:3.9.1'
// JPA querydsl // JPA querydsl ----------------------------------------------
implementation "com.querydsl:querydsl-jpa:${queryDslVersion}" implementation "com.querydsl:querydsl-jpa"
implementation "com.querydsl:querydsl-core:${queryDslVersion}" // querydsl JPAAnnotationProcessor
implementation "com.querydsl:querydsl-apt:${queryDslVersion}" annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jpa"
annotationProcessor( // java.lang.NoClassDefFoundError(javax.annotation.Entity)
"javax.persistence:javax.persistence-api", annotationProcessor "jakarta.persistence:jakarta.persistence-api"
"javax.annotation:javax.annotation-api", // java.lang.NoClassDefFoundError (javax.annotation.Generated)
"com.querydsl:querydsl-apt:${queryDslVersion}:jpa") annotationProcessor "jakarta.annotation:jakarta.annotation-api"
// ------------------------------------------------------------
// JPA mapstruct : lombok - mapstruct
// JPA mapstruct -----------------------------------------------------------
// lombok - mapstruct
// target class @Builder + setter Mapper Generation // target class @Builder + setter Mapper Generation
// @NoArgsConstructor, @Setter // @NoArgsConstructor, @Setter
// but, Setter mapstruct @Builder Generation // but, Setter mapstruct @Builder Generation
@ -267,52 +258,21 @@ tasks.withType(JavaCompile) {
//-----------------------------------------------------------------------------------// //-----------------------------------------------------------------------------------//
// querydsl // querydsl
//-----------------------------------------------------------------------------------// //-----------------------------------------------------------------------------------//
def querydslDir = "$buildDir/generated"
// querydsl
sourceSets {
main {
java {
srcDirs = ["$projectDir/src/main/java", querydslDir]
}
}
}
querydsl { /** clean 태스크 실행시 QClass 삭제 */
jpa = true /**
querydslSourcesDir = querydslDir * 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 { test {
exclude '**/*' exclude '**/*'
//useJUnitPlatform() //useJUnitPlatform()

@ -27,23 +27,5 @@ public class XitFrameworkApplicationCommandLineRunner implements CommandLineRunn
//System.out.println(new SCryptPasswordEncoder().encode("gnadmin")); //System.out.println(new SCryptPasswordEncoder().encode("gnadmin"));
//System.out.println(new DelegatingPasswordEncoder().encode("gnadmin", "")); //System.out.println(new DelegatingPasswordEncoder().encode("gnadmin", ""));
//System.out.println(new Pbkdf2PasswordEncoder().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; import org.springframework.test.context.ActiveProfiles;
@SpringBootTest @SpringBootTest
@ActiveProfiles(value="dev") //@ActiveProfiles(value="dev")
class JasyptApplicationTests { class JasyptApplicationTests {
@Test @Test

Loading…
Cancel
Save