• SSM框架整合


    1 Intellij Ideal创建Maven项目

    来自网上的解释: 
    archetypeCatalog表示插件使用的archetype元数据,不加这个参数时默认为remote,local,即中央仓库archetype元数据,由于中央仓库的archetype太多了,所以导致很慢,指定internal来表示仅使用内部元数据。

    新建java目录,设置为Sources

    整合Spring-MVC

    pom.xml配置

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>com.swl</groupId>
      <artifactId>SpringMvcDemo</artifactId>
      <packaging>pom</packaging>
      <version>1.0-SNAPSHOT</version>
      <name>SpringMvcDemo Maven Webapp</name>
      <url>http://maven.apache.org</url>
    
      <properties>
        <spring.version>4.1.3.RELEASE</spring.version>
      </properties>
    
      <dependencies>
        <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>3.8.1</version>
          <scope>test</scope>
        </dependency>
    
        <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-core</artifactId>
          <version>${spring.version}</version>
        </dependency>
        <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-context</artifactId>
          <version>${spring.version}</version>
        </dependency>
    
        <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-beans</artifactId>
          <version>${spring.version}</version>
        </dependency>
    
        <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-web</artifactId>
          <version>${spring.version}</version>
        </dependency>
    
        <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-webmvc</artifactId>
          <version>${spring.version}</version>
        </dependency>
    
      </dependencies>
      <build>
        <finalName>SpringMvcDemo</finalName>
      </build>
    </project>
  • 相关阅读:
    [文档].Altera 可选择的Nios II的Boot方法
    [原创].关于使用QII 10.0编译器无法编辑和查看中文的问题一个变通解决方案
    判断某程序是64位还是32位
    在调用RestoreSPSite时指定ContentDatabase
    CAML join
    ADODB.Connection Invalid connection error
    Sharepoint 如何修改Web.Config文件
    ActivateOnDefault & AutoActivateInCentralAdmin feature 属性
    Sharepoint 2010 解决DFWP Unable to display this Web Part 的问题
    Powershell点滴
  • 原文地址:https://www.cnblogs.com/flycoding/p/6111895.html
Copyright © 2020-2023  润新知