Skip to content

Commit

Permalink
Feature/set querydsl gitignore (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
YeaChan05 authored Feb 6, 2024
2 parents 9a114a8 + 583df4c commit 3cdc811
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ build/
!**/src/main/**/build/
!**/src/test/**/build/

### Config ###
.yml

### STS ###
.apt_generated
.classpath
Expand Down
18 changes: 18 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,32 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.projectlombok:lombok'
annotationProcessor "com.querydsl:querydsl-apt:5.0.0:jakarta"
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
annotationProcessor "jakarta.persistence:jakarta.persistence-api"
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

tasks.named('test') {
useJUnitPlatform()
}

def querydslDir = "$buildDir/generated/querydsl"

sourceSets {
main.java.srcDirs += [ querydslDir ]
}

tasks.withType(JavaCompile) {
options.annotationProcessorGeneratedSourcesDirectory = file(querydslDir)
}

clean.doLast {
file(querydslDir).deleteDir()
}
1 change: 1 addition & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

7 changes: 6 additions & 1 deletion src/test/java/org/kakaoshare/backend/TestComponentTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.*;

@SpringBootTest
class TestComponentTest {
@Autowired
TestComponent testComponent;

@ActiveProfiles(value="test")
class TestComponentTest {
@Autowired
TestComponent testComponent;
@Autowired
TestEntityRepository testEntityRepository;

@Test
void test_ci() {
// given
Expand All @@ -34,5 +40,4 @@ void test_h2() {
// then

}

}

0 comments on commit 3cdc811

Please sign in to comment.