Test case: https://github.com/Artur-/spring-jpa-test
After launching DemoApplication and opening http://localhost:8080 you should see
EntityManager knows about these entities: [Entity1]
After copying Entity1.java to Entity2.java and replacing all 1s with 2s` in the file, you should be able to reload the page and see
EntityManager knows about these entities: [Entity1, Entity2]
However, you will still see
EntityManager knows about these entities: [Entity1]
even though HotswapAgent outputs
HOTSWAP AGENT: 11:04:43.913 RELOAD (org.hotswap.agent.plugin.hibernate_jakarta.HibernateRefreshCommands) - Hibernate EntityMangerFactory configuration refreshed.
Side note: If you use JRebel, then it works as expected