0

I have a project written in Kotlin with Spring and Gradle. https://github.com/skoczman/oremus/tree/main

I have two problems:

  1. Gradle configuration - Gradle is building successful now, but I'm not sure, is configuration nice written.
  2. I'm creating EditionService.class (https://github.com/skoczman/oremus/blob/main/app-runner/src/main/kotlin/pl/oazapraga/oremus/app/edition/EditionServiceConfiguration.kt) manually and I cannot do this properly -> when app is running, and service method is called, it's appear that "this.repository is null".

Can I ask you to make review on this two points and give some suggestions, what should be fixed? Thanks a lot!

EDIT: I made a progress: I add "open" to findAll fun:

 open fun findAll(): List<Edition> {
    return repository.findAll()
}

W would like to add allOpen plugin in that case - can you help to configure it under Gradle?

2
  • I see that EditionRepository is defined in different module jpa-repository. But I did not find any @EnableJpaRepositories annotation on some persistence configuration class. This annotation on some configuration will enable creation of the EditionRepository. Commented Jan 8, 2024 at 12:59
  • But module with EditionRepository is imported in build.gradle of app-runner module. And package name matches. It is not enough? Commented Jan 8, 2024 at 15:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.