Skip to content

Commit

Permalink
docs: add guides for spring
Browse files Browse the repository at this point in the history
  • Loading branch information
jbl428 committed Nov 12, 2023
1 parent 581d5d3 commit 84fc35c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/en/jpql-with-kotlin-jdsl/paths.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ path(Book::getAvailable)
```

If you want to use your own rule instead of the above rules, you can implement `JpqlPropertyIntrospector` and provide it to `RenderContext`.
See [Custom DSL](./custom-dsl.md) for more details.
If you are using Spring, see [Spring supports](./spring-supports.md) also.

```kotlin
class MyIntrospector : JpqlPropertyIntrospector() {
Expand Down
2 changes: 1 addition & 1 deletion docs/en/jpql-with-kotlin-jdsl/spring-supports.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Kotlin JDSL supports Spring Boot AutoConfigure.
If you have Spring Boot and `com.linecorp.kotlin-jdsl:spring-data-jpa-support` or `com.linecorp.kotlin-jdsl:spring-batch-support` dependency together, the `JpqlRenderContext` bean is created by AutoConfiguration.

If you declare your `JpqlSerializer` as a bean, it will be included with the `JpqlRenderContext` bean.
If you declare your `JpqlSerializer` or `JpqlIntrospector` as a bean, it will be included with the `JpqlRenderContext` bean.

## Spring Data Repository

Expand Down
2 changes: 2 additions & 0 deletions docs/ko/jpql-with-kotlin-jdsl/paths.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ path(Book::getAvailable)
```

위 규칙 대신 나만의 규칙을 사용하고 싶다면, `JpqlPropertyIntrospector`를 구현하고 이를 이를 `RenderContext`에 추가해야 합니다.
더 자세한 내용은 [Custom DSL](./custom-dsl.md)을 참고하세요.
Spring을 사용하고 있다면 [Spring supports](./spring-supports.md)도 참고하세요.

```kotlin
class MyIntrospector : JpqlPropertyIntrospector() {
Expand Down
2 changes: 1 addition & 1 deletion docs/ko/jpql-with-kotlin-jdsl/spring-supports.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Kotlin JDSL은 Spring Boot AutoConfigure를 지원합니다.
만약 프로젝트가 Spring Boot와 `com.linecorp.kotlin-jdsl:spring-data-jpa-support` dependency를 같이 포함하고 있다면, `JpqlRenderContext` bean이 `KotlinJdslAutoConfiguration`를 통해 자동 생성 됩니다.

만약 `JpqlSerializer`를 bean으로 선언했다면, 자동으로 `JpqlRenderContext`에 해당 bean이 포함됩니다.
만약 `JpqlSerializer` 또는 `JpqlIntrospector`를 bean으로 선언했다면, 자동으로 `JpqlRenderContext`에 해당 bean이 포함됩니다.

## Spring Data Repository

Expand Down

0 comments on commit 84fc35c

Please sign in to comment.