Addon and repository

I have repository defined in an addon (com.company.addon.commons)

interface CityRepository : JmixDataRepository<City, UUID>

all it’s ok in this addon, build, test…

I create a second addon (com.company.addon.address), the default test is ok.
I add a dependency on the first one in the second one.
The default test is ko with the error

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.company.addon.address.repository.CityRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

To fix the spring initialisation, I need to add a line like this

interface CityRepository2 : CityRepository

in the child addon to load the repository defined in the parent addon.

How can I do to use repository defined in dependencies without redefine them in the current addon

I found a better solution ! may be the best solution ?

I added @EnableJmixDataRepositories("com.company.addon") on the Configuration of my first addon.
Because all my others addons have a package com.company.addon.*, it seems that all repositories are always found in my first addon, and in others addon too.

@Configuration
@ComponentScan
@ConfigurationPropertiesScan
@EnableJmixDataRepositories("com.company.addon")
@JmixModule(dependsOn = [EclipselinkConfiguration::class, UiConfiguration::class, SecurityConfiguration::class, SecurityUiConfiguration::class, SecurityDataConfiguration::class, MapsConfiguration::class, MapsUiConfiguration::class])
@PropertySource(name = "com.company.addon.commons", value = ["classpath:/com/company/addon/commons/module.properties"])
open class ComConfiguration {

Yes, it is the best solution: to have a different package with repositories in each addon and specify it in @EnableJmixDataRepositories