On this page
If you’re using Spring or Spring Boot, then use the Spring @Transactional annotation, as it allows you to configure more attributes than the Java EE @Transactional annotation.
If you are using Java EE alone, and you deploy your application on a Java EE application server, then use the Java EE @Transactional annotation.