zoukankan      html  css  js  c++  java
  • 多模块SSM RBAC案例项目环境搭建一项目框架搭建

    一项目模块划分

    项目的模块的划分与依赖关系如下图

    二 项目的创建

    (1)创建父项目

    File->new->Maven Project

    创建父项目时,注意打包方式是pom

    (2) 子项目创建

    右击rbac项目->new->project->Maven Model

    注意:rbac-common、rabc-manager、rbac-portal的打包方式是jar,rbac-web的打包方式是web。在rbac-web中可能会报错,原因是没有web.xml文件,在src/main/webapp/WEB-INF/目录下创建一个web.xml就行了

    (3) 项目创建后的项目结构

    (4)添加各个模块间的依赖关系

    在rbac-manager与rbac-portal的pom.xml文件中加入rbac-common的项目坐标,表示manager与portal模块依赖common模块

        <dependencies>
            <dependency>
                <groupId>com.ssm</groupId>
                <artifactId>rbac-common</artifactId>
                <version>0.0.1-SNAPSHOT</version>
            </dependency>
        </dependencies>

    在rbac-web的pom.xml文件中加入rbac-manager与rbac-portal的项目坐标,表示web模块依赖manager与portal模块

            <dependency>
                    <groupId>com.ssm</groupId>
                    <artifactId>rbac-manager</artifactId>
                    <version>0.0.1-SNAPSHOT</version>
            </dependency>
            <dependency>
                    <groupId>com.ssm</groupId>
                    <artifactId>rbac-portal</artifactId>
                    <version>0.0.1-SNAPSHOT</version>
            </dependency>    

    并在rbac-web的pom.xml中加入相应的插件,rbac-web的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>com.ssm</groupId>
            <artifactId>rbac</artifactId>
            <version>0.0.1-SNAPSHOT</version>
        </parent>
        <artifactId>rbac-web</artifactId>
        <packaging>war</packaging>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.6.0</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-war-plugin</artifactId>
                    <configuration>
                        <version>3.2.3</version>
                        <webXml>srcmainwebappWEB-INFweb.xml</webXml>
                    </configuration>
                </plugin>
            </plugins>
        </build>
        <dependencies>
            <dependency>
                    <groupId>com.ssm</groupId>
                    <artifactId>rbac-manager</artifactId>
                    <version>0.0.1-SNAPSHOT</version>
            </dependency>
            <dependency>
                    <groupId>com.ssm</groupId>
                    <artifactId>rbac-portal</artifactId>
                    <version>0.0.1-SNAPSHOT</version>
            </dependency>
        </dependencies>
    
    </project>

    至此整个项目的基本结构就搭建完了

  • 相关阅读:
    win7游戏窗口设置
    怎么在 html 中 动态的加载一个 script
    nodejs+express +jade模板引擎 新建项目
    将大数据利用 BCP 导出SqlServer数据到CSV
    产品经理如何赢得开发人员的尊重和支持?-摘自infoq
    Microsoft TFS 如何显示在Windows 的上下文菜单中
    使用PowerDesigner 设计SQL Server 数据库
    sqlserver 删掉日志文件ldf以后 救命语句
    SqlServer修改数据库文件及日志文件存放位置
    快速备份sqlserver2005以上版本数据库的方法-摘自网络
  • 原文地址:https://www.cnblogs.com/cplinux/p/12493866.html
Copyright © 2011-2022 走看看