0

I have a lot of entity classes organized in subpackages of a base one. can i somehow use the @EntityScan Annotation to scan for them recursively?

Per Example

package org.example.entity.letters
class A {}
class B {}

package org.example.entity.nums
class One {}
class Two {}

currently im specifying every subpackage explicitly

@EntityScan(basePackages={"org.example.entity.letters","org.example.entity.nums"})

is there a way to make this simpler?

like: (just imaginary)

@EntityScanRecursive("org.example.entity")

1 Answer 1

2

Just

@EntityScan(basePackages={"org.example.entity"})

is enough :D Why wouldn't you even try it?

Sign up to request clarification or add additional context in comments.

2 Comments

oh god. was missing the basePackages -_- ty
i mean in my code. really thanks a lot. saved me hours

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.