[ 
https://issues.apache.org/jira/browse/IGNITE-13029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17272576#comment-17272576
 ] 

Alexey Plotnik edited comment on IGNITE-13029 at 1/27/21, 5:32 AM:
-------------------------------------------------------------------

Let me share my concern about using @EnableRepositories annotation in 
auto-configuration classes.

After looking into Spring Boot Data autoconfigurers for Cassandra and Mongo I 
see that @EnableRepositories annotation is not used in internal 
auto-cofniguration class. Instead, looks like this annotation is designed for 
user application space because only user application knows its parameters like 
basePackages(where to scan for repository classes). When you extract 
@EnableRepositories into external library you can't control such parameters.

That's why this annotation is designed to be a part of application code (i.e. 
@Configuration classes) but not external lib such 
ignite-spring-boot-autoconfigure-ext.

 

Please, fix me if I'm wrong.


was (Author: alexey.plotnik):
Let me share my concern about using @EnableRepositories annotation on 
auto-configuration classes.

After looking into Spring Boot Data autoconfigurers for Cassandra and Mongo I 
see that @EnableRepositories annotation is not used in internal 
auto-cofniguration class. Instead, this annotation is for user application 
because only user application knows its parameters like basePackages. When you 
extract @EnableRepositories into external library you can't control such 
parameters.

 

That's why by design main target of this annotation is application code (i.e. 
@Configuration classes) but not external lib.

 

Please, fix me if I'm wrong.

> Support Spring Data repositories initialization with Spring Boot auto-starter
> -----------------------------------------------------------------------------
>
>                 Key: IGNITE-13029
>                 URL: https://issues.apache.org/jira/browse/IGNITE-13029
>             Project: Ignite
>          Issue Type: Improvement
>          Components: spring, springdata
>    Affects Versions: 2.8
>            Reporter: Denis A. Magda
>            Assignee: Alexey Plotnik
>            Priority: Major
>              Labels: newbie
>
> It's required to use {{@EnableIgniteRepositories}} annotation and follow this 
> procedure to enable Ignite Spring Data repositories:
> https://apacheignite-mix.readme.io/docs/spring-data#spring-data-and-apache-ignite-configuration
> Support the Spring Data repositories enablement via the Spring Boot 
> auto-starter if Spring Boot is used by a project:
> https://apacheignite-mix.readme.io/docs/spring-boot



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to