I have a Spring Boot application (Y) which relies upon a set of Library files packed as x.jar and mentioned as a dependency in the pom.xml of the application Y.
x.ja
You would need to add the package names of your main class and the User class to be 100% sure, but more then likely, the User class is not in the same package (or a subpackage) of your main class. This means that component scanning will not pick it up.
You can force spring to look at other packages like this:
@ComponentScan(basePackages = {"org.example.main", "package.of.user.class"})