java:maven(maven-ssm(聚合,分包开发))

1.maven-ssm:

  maven-ssm_diy:

  

  

    pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<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.0</modelVersion>
    <groupId>cn.zzsxt</groupId>
    <artifactId>maven-ssm_diy</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>pom</packaging>

    <build>
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <!-- tomcat7插件 -->
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <configuration>
                    <port>8080</port>
                    <path>/crud</path>
                </configuration>
            </plugin>
        </plugins>

    </build>
    <!-- 聚合子模块,添加子模块时自动添加 -->
    <modules>
        <module>maven-ssm-dao</module>
        <module>maven-ssm-service</module>
        <module>maven-ssm-web</module>
    </modules>
    <properties>
        <!-- 版本声明 -->
        <spring.version>4.3.9.RELEASE</spring.version>
        <aspectj.version>1.8.9</aspectj.version>
        <mybatis.version>3.4.1</mybatis.version>
        <mybatis-spring.version>1.3.0</mybatis-spring.version>
        <c3p0.version>0.9.5.2</c3p0.version>
        <mysql.version>5.1.38</mysql.version>
        <log4j.version>1.2.17</log4j.version>
        <slf4j.version>1.7.25</slf4j.version>
        <slf4j-log4j12.version>1.7.21</slf4j-log4j12.version>
        <javaee-version>7.0</javaee-version>
        <servlet-version>3.1.0</servlet-version>
        <jsp-version>2.2</jsp-version>
        <jstl-version>1.2</jstl-version>
    </properties>
    <dependencyManagement>
        <dependencies>
            <!-- javaee7 -->
            <dependency>
                <groupId>javax</groupId>
                <artifactId>javaee-api</artifactId>
                <version>${javaee-version}</version>
                <scope>provided</scope>
            </dependency>
            <!-- servlet api -->
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>${servlet-version}</version>
                <scope>provided</scope>
            </dependency>
            <!-- jsp api -->
            <dependency>
                <groupId>javax.servlet.jsp</groupId>
                <artifactId>jsp-api</artifactId>
                <version>${jsp-version}</version>
                <scope>provided</scope>
            </dependency>
            <!-- jstl -->
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>jstl</artifactId>
                <version>${jstl-version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <!-- jar文件依赖 -->
    <!-- spring -->
    <dependencies>
        <!-- spring-context依赖spring-core,spring-beans,spring-aop,commons-logging,spring-expression,spring-context -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <!-- spring-test -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${spring.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- spring-webmvc依赖spring-web -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <!-- spring-jdbc,spring-tx -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <!-- spring-context-support -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <!-- spring-orm,spring-core,spring-beans,common-logging,spring-jdbc,spring-tx -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <!-- spring-aspects,aspectjweaver -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aspects</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>${aspectj.version}</version>
        </dependency>
        <!-- mybatis -->
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis</artifactId>
            <version>${mybatis.version}</version>
        </dependency>
        <!-- mybatis-spring -->
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis-spring</artifactId>
            <version>${mybatis-spring.version}</version>
        </dependency>
        <!-- c3p0 -->
        <dependency>
            <groupId>com.mchange</groupId>
            <artifactId>c3p0</artifactId>
            <version>${c3p0.version}</version>
        </dependency>
        <!-- mysql -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>${mysql.version}</version>
        </dependency>
        <!-- log4j -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>${log4j.version}</version>
        </dependency>
        <!-- slf4j -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j-log4j12.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- junit -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>

   maven-ssm-dao:

 

    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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>cn.zzsxt</groupId>
    <artifactId>maven-ssm_diy</artifactId>
    <version>0.0.1-SNAPSHOT</version>
  </parent>
  <artifactId>maven-ssm-dao</artifactId>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

    applicationContext-dao.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
        http://www.springframework.org/schema/aop
        http://www.springframework.org/schema/aop/spring-aop.xsd
        http://www.springframework.org/schema/tx
        http://www.springframework.org/schema/tx/spring-tx.xsd
       http://www.springframework.org/schema/context
       http://www.springframework.org/schema/context/spring-context.xsd">

       <!-- 扫描注解包 -->
       <context:component-scan base-package="cn.zzsxt.ssm"></context:component-scan>

       <!-- 数据源 -->
       <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
                <property name="driverClass" value="com.mysql.jdbc.Driver"></property>
                <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/test"></property>
                <property name="user" value="root"></property>
                <property name="password" value="root"></property>
       </bean>

       <!-- 配置SqlSessionFactory,并注入数据源 -->
       <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
               <property name="dataSource" ref="dataSource"></property>
               <!-- 加载cn/zzsxt/ssm/mapper/所有以 Mapper.xml结尾的映射文件 -->
               <property name="mapperLocations" value="classpath:cn/zzsxt/ssm/mapper/*Mapper.xml"></property>
       </bean>

         <!-- 配置MapperScannerConfigurer,用于扫描指定包下的Mapper接口,生成代理对象的id为Mapper接口名第一个字母小写 -->
       <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
               <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
               <property name="basePackage" value="cn.zzsxt.ssm.mapper"></property>
       </bean>
</beans>

    log4j.properties:   

log4j.rootLogger=DEBUG, Console

log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%-5p - %m%n
log4j.logger.org.mybatis.spring=ERROR
log4j.logger.org.apache.ibatis.logging.LogFactory=ERROR
log4j.logger.com.alibaba.druid.pool.DruidDataSource=ERROR

    UserinfoMapper.java:

package cn.zzsxt.ssm.mapper;

import java.util.List;

import cn.zzsxt.ssm.model.Userinfo;

public interface UserinfoMapper {
    List<Userinfo> findAll();
    int addUserinfo(Userinfo userinfo);
    int delete(int userId);
    int update(int userId);
    Userinfo findById(int userId);
}

    UserinfoMapper.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="cn.zzsxt.ssm.mapper.UserinfoMapper">
    <select id="findAll" resultType="cn.zzsxt.ssm.model.Userinfo">
        select * from userinfo
    </select>
    <insert id="addUserinfo" parameterType="cn.zzsxt.ssm.model.Userinfo">
        insert into userinfo(userName,userPass,userType)values(#{userName},#{userPass},#{userType})
    </insert>
</mapper>

    Userinfo.java:

package cn.zzsxt.ssm.model;

public class Userinfo {
    private int userId;
    private String userName;
    private String userPass;
    private int userType;
    public int getUserId() {
        return userId;
    }
    public void setUserId(int userId) {
        this.userId = userId;
    }
    public String getUserName() {
        return userName;
    }
    public void setUserName(String userName) {
        this.userName = userName;
    }
    public String getUserPass() {
        return userPass;
    }
    public void setUserPass(String userPass) {
        this.userPass = userPass;
    }
    public int getUserType() {
        return userType;
    }
    public void setUserType(int userType) {
        this.userType = userType;
    }
    @Override
    public String toString() {
        return "Userinfo [userId=" + userId + ", userName=" + userName + ", userPass=" + userPass + ", userType="
                + userType + "]";
    }
}

    Test1.java: 

package cn.zzsxt.ssm.test;

import java.util.List;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import cn.zzsxt.ssm.mapper.UserinfoMapper;
import cn.zzsxt.ssm.model.Userinfo;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"classpath:applicationContext-dao.xml"})
public class Test1 {
    @Autowired
    private UserinfoMapper userinfoMapper;
    @Test
    public void test1(){
        List<Userinfo> l=userinfoMapper.findAll();
        for (Userinfo u : l) {
            System.out.println(u);
        }
    }
}

  maven-ssm-service:

    

    applicationContext-service.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
        http://www.springframework.org/schema/aop
        http://www.springframework.org/schema/aop/spring-aop.xsd
        http://www.springframework.org/schema/tx
        http://www.springframework.org/schema/tx/spring-tx.xsd
       http://www.springframework.org/schema/context
       http://www.springframework.org/schema/context/spring-context.xsd">

      <context:component-scan base-package="cn.zzsxt.ssm"></context:component-scan> 

      <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
              <property name="dataSource" ref="dataSource"></property>
      </bean>

      <tx:advice id="txAdvice" transaction-manager="transactionManager">
              <tx:attributes>
                  <tx:method name="add*" propagation="REQUIRED"/>
                  <tx:method name="update*" propagation="REQUIRED"/>
                  <tx:method name="delete*" propagation="REQUIRED"/>
                  <tx:method name="*" propagation="SUPPORTS"/>
              </tx:attributes>
      </tx:advice>

      <aop:config>
          <aop:pointcut expression="execution(* cn.zzsxt.ssm.service.*.*(..))" id="serviceMethods"/>
          <aop:advisor advice-ref="txAdvice" pointcut-ref="serviceMethods"/>
      </aop:config>
</beans>

    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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>cn.zzsxt</groupId>
    <artifactId>maven-ssm_diy</artifactId>
    <version>0.0.1-SNAPSHOT</version>
  </parent>
  <artifactId>maven-ssm-service</artifactId>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
    </plugins>
  </build>
  
  <dependencies>
        <dependency>
            <groupId>cn.zzsxt</groupId>
            <artifactId>maven-ssm-dao</artifactId>
            <version>0.0.1-SNAPSHOT</version>
        </dependency>
    </dependencies>
</project>

    UserinfoServiceImpl.java:

package cn.zzsxt.ssm.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.zzsxt.ssm.mapper.UserinfoMapper;
import cn.zzsxt.ssm.model.Userinfo;
import cn.zzsxt.ssm.service.UserinfoService;
@Service
public class UserinfoServiceImpl implements UserinfoService {
    @Autowired
    private UserinfoMapper userinfoMapper;
    @Override
    public List<Userinfo> findAll() {
        // TODO Auto-generated method stub
        return userinfoMapper.findAll();
    }
    @Override
    public int addUserinfo(Userinfo userinfo) {
        // TODO Auto-generated method stub
        return userinfoMapper.addUserinfo(userinfo);
    }

}

    UserinfoService.java:

package cn.zzsxt.ssm.service;

import java.util.List;

import cn.zzsxt.ssm.model.Userinfo;

public interface UserinfoService {
    List<Userinfo> findAll();
    int addUserinfo(Userinfo userinfo);
}

    Test1.java:

package cn.zzsxt.ssm.test;

import java.util.List;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import cn.zzsxt.ssm.model.Userinfo;
import cn.zzsxt.ssm.service.UserinfoService;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"classpath:applicationContext-dao.xml","classpath:applicationContext-service.xml"})
public class Test1 {
    @Autowired
    private UserinfoService userinfoService;
    @Test
    public void findAll(){
        List<Userinfo> list = userinfoService.findAll();
        for (Userinfo userinfo : list) {
            System.out.println(userinfo);
        }
    }
}

  maven-ssm-web:(无骨架创建,war)

    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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>cn.zzsxt</groupId>
    <artifactId>maven-ssm_diy</artifactId>
    <version>0.0.1-SNAPSHOT</version>
  </parent>
  <artifactId>maven-ssm-web</artifactId>
  <packaging>war</packaging>

  <build/>

  <dependencies>
      <dependency>
          <groupId>cn.zzsxt</groupId>
          <artifactId>maven-ssm-service</artifactId>
          <version>0.0.1-SNAPSHOT</version>
      </dependency>

          <!-- javaee7 -->
    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <scope>provided</scope>
    </dependency>
    <!-- servlet api -->
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <scope>provided</scope>
    </dependency>
    <!-- jsp api -->
    <dependency>
        <groupId>javax.servlet.jsp</groupId>
        <artifactId>jsp-api</artifactId>
        <scope>provided</scope>
    </dependency>
    <!-- jstl -->
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>jstl</artifactId>
    </dependency>
  </dependencies>

</project>

    UserinfoController.java:

package cn.zzsxt.ssm.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.zzsxt.ssm.model.Userinfo;
import cn.zzsxt.ssm.service.UserinfoService;

@Controller
@RequestMapping("/user")
public class UserinfoController {
    @Autowired
    private UserinfoService userinfoService;

    @RequestMapping("/list")
    public String list(Model model){
        List<Userinfo> list = userinfoService.findAll();
        model.addAttribute("list", list);
        return "list";
    }
    @RequestMapping("/add")
    public String add(Userinfo userinfo){
        userinfoService.addUserinfo(userinfo);

            return "redirect:/user/list";

    }
}

    springmvc.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
      http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
      http://www.springframework.org/schema/mvc
      http://www.springframework.org/schema/mvc/spring-mvc.xsd
      http://www.springframework.org/schema/context
      http://www.springframework.org/schema/context/spring-context.xsd">

      <context:component-scan base-package="cn.zzsxt.ssm"></context:component-scan>

      <mvc:annotation-driven></mvc:annotation-driven>

      <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
          <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"></property>
          <property name="prefix" value="/"></property>
          <property name="suffix" value=".jsp"></property>
      </bean>
</beans>      

    web.xml:   

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">

  <display-name>ssmDemo</display-name>

  <!-- 配置ContextLoaderListener -->
  <listener>
      <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>
  <context-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>classpath*:applicationContext-*.xml</param-value>
  </context-param>

  <!-- 前端控制器 -->
  <servlet>
      <servlet-name>springmvc</servlet-name>
      <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
      <init-param>
          <param-name>contextConfigLocation</param-name>
          <param-value>classpath:springmvc.xml</param-value>
      </init-param>
  </servlet>

  <servlet-mapping>
      <servlet-name>springmvc</servlet-name>
      <url-pattern>/</url-pattern>
  </servlet-mapping>
</web-app>

  

  

时间: 2024-10-12 04:18:48

java:maven(maven-ssm(聚合,分包开发))的相关文章

使用maven搭建ssm框架的javaweb项目

目前主流的javawe项目,常会用到ssm(Spring+Spring MVC+Mybatis)框架来搭建项目的主体框架,本篇介绍搭建SSM矿建的maven项目的实施流程.记之共享! 一.SSM框架介绍 SSM框架是指:Spring+Spring MVC+Mybatis. [Spring] 轻量--从大小与开销两方面而言Spring都是轻量的,此外,Spring是非侵入式的:典型地,Spring应用中的对象不依赖于Spring的特定类.简单说就是自己需要什么就导入对应的jar的即可,而不是侵入式

Maven+Hibernate+Spring+Spring MVC开发新闻发布系统

使用Maven+Hibernate+Spring+Spring MVC开发新闻发布系统 课程学习地址:http://www.xuetuwuyou.com/course/163 课程出自学途无忧网:http://www.xuetuwuyou.com 课程介绍 一.课程用到的软件: 1.jdk 1.8 2.eclipse neon 3.tomcat 8 4.jetty 5.MySQL  6.navicat 9+ 二.课程涉及到的技术点 1.Maven基础 2.Maven高级 3.Hibernate

Maven管理SSM框架的pom.xml文件配置(自动下载所依赖的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/maven-v4_0_0.xsd"> <modelVersion&

Java+TestNG+Maven+Selenium的web自动化测试脚本环境的搭建

一.环境搭建 1.安装java环境 a. 安装JDK b.安装eclipse c.安装maven 参考:http://www.cnblogs.com/s1328/p/4620812.html 2.安装eclipse下的testng插件 Eclipse中点击Help->Install new software -> 点击Add 在Location输入 http://beust.com/eclipse 选中Testng版本,点击Next,按照提示安装,安装完之后重启Eclipse 3.安装fire

基于SSH2+Maven+EasyUI+MySQL技术实战开发易买网电子商务交易平台【课程分享】

链接:http://pan.baidu.com/share/link?shareid=1334596560&uk=3611155194 密码:ffna 对这个课程有兴趣的朋友可以加我的QQ2059055336和我联系 课程讲师:IT小生 课程分类:Java 适合人群:中级 课时数量:52课时 用到技术:Hibernate.Struts.Spring.Maven.EasyUI 涉及项目:易买网电子商务 更新程度:完毕 一.易买网前台部分讲解: 第一讲: Maven初体验 第二讲:Maven打包测试

maven搭建ssm

前言 本文旨在利用maven搭建ssm环境,而关于maven的具体内容,大家可以去阅读<Maven 实战>.其实园内这方面文章已有不少,那么为什么我还要重复造轮子呢?我只是想记录自己的实践过程罢了,附带着给别人以参考.对于别人的博文,看了固然好,要是能付之实践,那就更好了! maven安装 安装过程挺简单的,去apache下载apache-maven的zip包,解压到一个目录下,如下图 接下来配置windows环境,右击我的电脑-->属性-->高级系统设置-->环境变量--&

eclipse + maven搭建SSM框架

0.系统环境 1)Windows 10 企业版 2)JDK 1.8.0_131 3)Eclipse Java EE IDE for Web Developers  Version: Neon.3 Release (4.6.3) 4)Tomcat 8.5 1.maven下载及配置 maven的下载地址:http://maven.apache.org/download.cgi 下载后解压放在d:\Java路径下 在环境变量中,新增系统变量名:MAVEN_HOME,变量值:D:\Java\maven

Maven项目搭建(二):Maven搭建SSM框架

        上一章给大家讲解了如何使用Maven搭建web项目.       这次给大家介绍一下怎么使用Maven搭建SSM框架项目.       首先我们来看一下pom.xml的属性介绍: project: pom的xml根元素. parent:  声明继承. modules:  声明聚合,该值是一个当前POM的相对目录.用户项目的聚合. groupId:  定义当前Maven项目隶属的实际项目. artifactId:  定义实际项目中的一个Maven项目模块,一般为实际项目名称. ve

Maven 搭建 SSM 项目 (oracle)

简单谈一下maven搭建 ssm 项目 (使用数据库oracle,比 mysql 难,所以这里谈一下) 在创建maven 的web项目时,常常会缺了main/java , main/test 两个文件夹. 解决方法: ① : 在项目上右键选择properties,然后点击java build path,在Librarys下,编辑JRE System Library,选择workspace default jre就可以了. (推荐使用这种) ② :手动创建 目录.切换视图采用Navigator视图

使用Eclipse通过Maven搭建SSM框架

一,工具说明 Eclipse版本:“Eclipse Jee 2018-12”,(因为我用的是最新的eclipse,该版本已经集成了maven,所以我直接使用即可.如果你的没有Maven的话就需要安装Maven了,百度一下即可) 二,配置文件说明 pox.xml:maven依赖配置文件. dispatcher-servlet.SpringMVC配置文件. spring-config.xml  :spring配置文件 mybatis-mapper :mybatis的mapper管理配置文件 三,项目