This week's book giveaway is in the Reactive Progamming forum. We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line! See this thread for details.
Classes annotated with @Entity are JPA entities - they usually represent rows in a database. These are not Spring-managed beans, so you cannot inject them. You normally also don't need to inject these classes. Why are you trying to do this?
The way you work with these classes is for example through Spring Data JPA. You create repository interfaces, and then you inject these into your program. You read and write entities from and to the database through these repositories.
Classes with @Entity and @Repository annotations on them are just regular classes, to use them it doesn't matter if you have those classes in your project itself or in an external JAR file.
You don't have to do anything different if those classes are in an external JAR file rather than in your project itself - just make sure the JAR is in the classpath when you compile and run your own project.
Spring does not prevent you in any way from using @Entity classes that are in an external JAR file.
The Spring guide Accessing Data with JPA already shows you exactly how you can use a Spring Data JPA @Repository to store and retrieve @Entity objects in a database.
You do not need to do anything with an EntityManager if you use this. Spring will take care of creating and calling the EntityManager for you.
Ofcourse, your Spring configuration would need to have the correct setup to create a DataSource Spring bean to connect to the database. The tutorial uses Spring Boot, which makes this very easy; by having a dependency on the H2 database, Spring Boot automatically configures everything. If you need to use different database username / password and other settings, you can define properties in application.properties to configure this (only if you are using Spring Boot!).