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>

  • 相关阅读:
    端午节
    使用MetaWeblog写博客
    Ajax 跨域操作
    MetaWeblogApi 开发, 离线写博客
    大三开学
    JVM003ConcurrentHashMap底层原理是什么
    JVM009JVM性能调优概述
    JVM006Java类加载器有哪些
    JVM004GC如何判断对象可以被回收
    JVM008JVM内存结构如何划分
  • 原文地址:https://www.cnblogs.com/chenying99/p/2467416.html
Copyright © 2011-2022 走看看