Skip to content

@AutoConfigurationPackage unpredictable behaviour depending on package name #44812

@Rostik96

Description

@Rostik96

Hello, team!

My issue is intertwined with #19024.

Suppose, I've "client" app that has spring-boot-data-jpa with its automatic scan for Entity's and JpaRepository's in main app.
Also, there are two spring-boot-starters that "client" uses:
first-starter
second-starter

Theirs packages names consequently:
▹ com.rost.starter
▹ ru

Both AutoConfiguration's [1, 2] contains @AutoConfigurationPackage annotation on top to add its Enity's and JpaRepository's to automatic scan in "client" service.

However, entity/repo from first-starter are added to AppContext, but entity/repo from the second one aren't, what we could see in appropriate test case.

But...when I rename package

ru.transport

to, let's say,

ez

It's starting to work!


I've tried a lot of different packages names in second-starter and still haven't identified any pattern.
For some names all is good, but for some – no.

The hours of debugging also didn't help to figure out the reason why package is cut off by name.
But It looks exactly like this ^))

So, tell me please, what's going on?

GitHub🔗

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions