How to configure Spring MVC with Hibernate java config (without xml's)

0

Hi, I am working on a project in spring mvc, I have already done some of them before but I configured them with xml. The java option makes me cleaner. In this application I have already configured:

  • Apache Tiles
  • slf4j with logback

I tried to configure hibernate, but when I ran my app, it deconfigured everything else and I did not run ...

By the way, I am generating Entities automatically in netbeans, which loads me some extra packages of eclipse jpa ?? Is this okay or is there a better way?

Greetings

    
asked by juanpsainzg 26.10.2016 в 17:27
source

1 answer

0

To configure Spring MVC without XML you must use the WebApplicationInitializer interface, you can do it directly by implementing the interface or you can extend the AbstractAnnotationConfigDispatcherServletInitializer class that already implements it, you can see these examples:

Spring MVC without XML: link

Spring MVC with Hibernate: link

    
answered by 25.03.2017 в 15:44