spring学习之环境搭建

1、maven工程创建

spring学习之环境搭建_第1张图片
spring学习之环境搭建_第2张图片
spring学习之环境搭建_第3张图片
这样便创建完成。

2、pom文件配置

pom文件中主要添加spring的jar包,测试类jar包,jsp servlet的jar包具体文件如下:

<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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0modelVersion>
  <groupId>liuyuan.springgroupId>
  <artifactId>source.code.studyartifactId>
  <version>0.0.1-SNAPSHOTversion>
  <packaging>warpackaging>

  <dependencies>
     
    <dependency>  
        <groupId>jstlgroupId>  
        <artifactId>jstlartifactId>  
        <version>1.2version>
    dependency>  
    <dependency>  
        <groupId>javax.servletgroupId>  
        <artifactId>servlet-apiartifactId>  
        <version>2.5version>
        <scope>providedscope>  
    dependency>  
    <dependency>  
        <groupId>javax.servletgroupId>  
        <artifactId>jsp-apiartifactId>  
        <version>2.0version>
        <scope>providedscope>  
    dependency>  
       
    <dependency>
         <groupId>org.springframeworkgroupId>
         <artifactId>spring-testartifactId>
         <version>4.2.4.RELEASEversion>
    dependency> 
    <dependency>
            <groupId>junitgroupId>
            <artifactId>junitartifactId>
            <version>4.11version>
            <scope>testscope>
    dependency>
    
    <dependency>  
        <groupId>org.springframeworkgroupId>  
        <artifactId>spring-contextartifactId>  
        <version>4.2.4.RELEASEversion>
    dependency>  
    <dependency>  
        <groupId>org.springframeworkgroupId>  
        <artifactId>spring-beansartifactId>  
        <version>4.2.4.RELEASEversion>
    dependency>  
    <dependency>  
        <groupId>org.springframeworkgroupId>  
        <artifactId>spring-webmvcartifactId>
        <version>4.2.4.RELEASEversion>  
    dependency>  
    <dependency>  
        <groupId>org.springframeworkgroupId>  
        <artifactId>spring-jdbcartifactId>  
        <version>4.2.4.RELEASEversion>
    dependency>  
    <dependency>  
        <groupId>org.springframeworkgroupId>  
        <artifactId>spring-aspectsartifactId>  
        <version>4.2.4.RELEASEversion>
    dependency>  
    <dependency>  
        <groupId>org.springframeworkgroupId>  
        <artifactId>spring-context-supportartifactId>  
        <version>4.2.4.RELEASEversion>
    dependency>  
  dependencies>
  <build>
     <plugins>
         <plugin>
             <artifactId>maven-war-pluginartifactId>
             <version>2.4version>
             <configuration>
                 <version>3.0version>
             configuration>
         plugin>
     plugins>
  build>
project>

你可能感兴趣的:(spring学习)