micronaut-projects / micronaut-data

Ahead of Time Data Repositories
Apache License 2.0
466 stars 197 forks source link

micronaut-data-spring brings hibernate, spring-data-commons dependencies #627

Closed cemo closed 4 years ago

cemo commented 4 years ago

I was trying to use micronaut-data-spring for bridging our Spring Boot application with Micronaut Data. However I noticed that micronaut-data-spring has dependencies to hibernate, spring-data-commons. I was not expecting this actually. I think these dependencies can be optional.

It may be better to make them optional? Otherwise unpleasant surprises may come up. For example I am only interested in jdbc package of micronaut-data-spring but hibernate and spring-data dependencies are transitively appear in my classpath. On my side I was expecting only glue code with Spring and Micronaut. However I got hibernate dependencies on my classpath. :) The problem is that these packages are triggering other Micronaut features which are mostly activated presence of a class in classpath.

graemerocher commented 4 years ago

Good points. Seems like some of the dependencies should be in https://github.com/micronaut-projects/micronaut-data/tree/master/data-spring-jpa