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>

  • 相关阅读:
    PAT Basic 1001
    PAT基础6-11
    PAT基础6-12
    PAT基础6-10
    修改正在进行遍历的列表
    使用管道和cronolog切割日志
    python logging模块
    python实现广度优先搜索和深度优先搜索
    多继承下的super()指向的不一定是直接父类
    python3 pandas DataFrame常见用法
  • 原文地址:https://www.cnblogs.com/chenying99/p/2467416.html
Copyright © 2011-2022 走看看