zoukankan      html  css  js  c++  java
  • Spring 3 MVC and Hibernate 3 Example Part 1

    This tutorial explains how to use annotations with spring 3 MVC and hibernate 3 based application to make the development easier and faster than ever before. 

    Spring 3 MVC and Hibernate 3 Example application using Annotations

    This tutorial explains how to use annotations with spring 3 MVC and hibernate 3 based application to make the development easier and faster than ever before. You can download also the application (Including all jar files required), we are going to explain.

    The application directory structure should look like as below, if you are developing the application in Eclipse.

    Project Structure:

    project-structure

    Jar files Required:

    Here is the list of jar files required for the application.(Jar files are included with the application download.)

    lib1

    lib2

    web.xml:

    You must be aware of how spring is configured in web.xml. Here is the web.xml we configured for our application. All html requests are processed via spring.

    <?xml version="1.0" encoding="UTF-8"?>
    <
    web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

    <servlet>

    <servlet-name>dispatcher</servlet-name>

    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

    <load-on-startup>1</load-on-startup>

    </servlet>

    <servlet-mapping>

    <servlet-name>dispatcher</servlet-name>

    <url-pattern>*.html</url-pattern>

    </servlet-mapping>

    <welcome-file-list>

    <welcome-file>index.html</welcome-file>

    </welcome-file-list>

    </web-app>

  • 相关阅读:
    服务注册中心之Eureka使用
    微服务之服务注册中心
    Idea热部署功能
    微服务Cloud整体聚合工程创建过程
    微服务架构理论&SpringCloud
    关于母函数
    HDU 1028(母函数)整数划分
    1021 FIBERNACI
    1019
    1014 巧妙的gcd 生成元
  • 原文地址:https://www.cnblogs.com/chenying99/p/2467416.html
Copyright © 2011-2022 走看看