Hibernate annotations example mkyong12/12/2023 ![]() Public class SpringWebAppInitializer implements WebApplicationInitializer void onStartup(ServletContext servletContext) throws ServletException This SessionFactory bean will be wired into the UserDAO bean below. Import .support.AnnotationConfigWebApplicationContext Spring framework provides an implementation - the SpringServletContainerInitializer class which delegates a Servlet context to any implementations of the WebApplicationInitializer interface.Thus, let’s create SpringWebAppInitializer class to put our bootstrap code like the following: package Bootstrapping Spring Dispatcher ServletInstead of using XML in web.xml to register the Spring Dispatcher Servlet, we can move the bootstrap code into a Java class that implements the ServletContainerInitializerinterface which is introduced from Servlet 3.0.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |