1. SSH项目

OA项目,办公自动化,将公司的数据,文档,流程实现在系统中的管理。

降低人员交流过程中的成本。提高办公的效率。

2 .系统管理

主要实现系统权限的管理,不同的用户登陆后看到菜单项不一样(菜单级的权限控制)。

2.1 RBAC权限模型

基于角色的访问控制(Role-Based Access Control)

总结:系统的权限管理中,是将相应资源的访问权限赋予角色,再将某个用户添加到某个角色

实体:用户表,角色表,资源表,资源_角色表,用户_角色表。

2.2RBAC的数据库模型

3 .搭建项目环境

3.1建立项目目录结构

3.2加入项目jar包

3.3导入js和css

3.4建立项目的配置文件

db.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:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
"> <!-- 配置数据库连接池 -->
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
<!-- 向连接池中注入值 -->
<property name="driverClass" value="com.mysql.jdbc.Driver"></property>
<property name="jdbcUrl" value="jdbc:mysql://127.0.0.1:3306/test"></property>
<property name="user" value="root"></property>
<property name="password" value="root"></property>
</bean>
<!-- 实例化sessionFactory -->
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<!-- 注入数据库连接池 -->
<property name="dataSource" ref="dataSource"></property>
<!-- 配置hibernate的特性 -->
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.format_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
<!-- 加载hibernate的映射文件 -->
<property name="mappingResources">
<list>
<value>org/guangsoft/pojo/Dept.hbm.xml</value>
<value>org/guangsoft/pojo/User.hbm.xml</value>
<value>org/guangsoft/pojo/Role.hbm.xml</value>
</list>
</property>
</bean> </beans>

transaction.xml

 <?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
"> <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<!-- 声明事务特性 -->
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="add*" propagation="REQUIRED" isolation="DEFAULT"/>
<tx:method name="delete*" propagation="REQUIRED" isolation="DEFAULT"/>
<tx:method name="update*" propagation="REQUIRED" isolation="DEFAULT"/>
<tx:method name="save*" propagation="REQUIRED" isolation="DEFAULT"/>
<tx:method name="get*" propagation="REQUIRED" isolation="DEFAULT"/>
<tx:method name="select*" propagation="REQUIRED" isolation="DEFAULT"/>
<tx:method name="*" propagation="REQUIRED" isolation="DEFAULT"/>
</tx:attributes>
</tx:advice>
<!-- 进行aop配置 -->
<aop:config>
<aop:pointcut expression="execution(* org.guangsoft.service.impl.*.*(..))" id="pc"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="pc"/>
</aop:config>
</beans>

applicationContext.xml

 <?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
">
<import resource="db.xml"/>
<import resource="transaction.xml"/>
<!-- 开启扫描注解 -->
<context:component-scan base-package="org.guangsoft.dao.impl,
org.guangsoft.service.impl,org.guangsoft.action"></context:component-scan>
</beans>

基于SSH2的OA项目1.0_20161206_需求分析与框架搭建的更多相关文章

  1. 基于SSH2的OA项目1.1_20161207_业务开发

    1.1建立用户的pojo模型 建立user.java package org.guangsoft.pojo; import java.util.HashSet; import java.util.Se ...

  2. 基于全注解的SpringMVC+Spring4.2+hibernate4.3框架搭建

    概述 从0到1教你搭建spring+springMVC+hibernate整合框架,基于注解. 本教程框架为基于全注解的SpringMVC+Spring4.2+hibernate4.3,开发工具为my ...

  3. Update(Stage5):DMP项目_业务介绍_框架搭建

    DMP (Data Management Platform) 导读 整个课程的内容大致分为如下两个部分 业务介绍 技术实现 对于业务介绍, 比较困难的是理解广告交易过程中各个参与者是干什么的 对于技术 ...

  4. 从零开始--Spring项目整合(1)使用maven框架搭建项目

    这些年一直在用spring的框架搭建项目,现在开始我们从零开始利用Spring框架来搭建项目,目前我能想到有Spring.SpringMVC.SpringJDBC.Mybatis.WebSockt.R ...

  5. 项目实战 - 原理讲解<-> Keras框架搭建Mtcnn人脸检测平台

    Mtcnn它是2016年中国科学院深圳研究院提出的用于人脸检测任务的多任务神经网络模型,该模型主要采用了三个级联的网络,采用候选框加分类器的思想,进行快速高效的人脸检测.这三个级联的网络分别是快速生成 ...

  6. 零开始:NetCore项目权限管理系统:基础框架搭建

    有兴趣的同学可以一起做 喜欢NetCore的朋友,欢迎加群QQ:86594082 源码地址:https://github.com/feiyit/SoaProJect 新建一个空的解决方案,建立对应的解 ...

  7. OA项目实战(二) 开发准备

    上次的博文OA系统实践(一) 概述中,我们已经了解了OA的相关概念.从本次博文开始,我们做一个简单的OA实例. 在OA开发之前,有几个工作们需要提前做.一个是对需求进行分析,另一个是对开发环境进行选择 ...

  8. 《WAP团队》作业四——基于原型的团队项目需求调研与分析

    基于原型的团队项目需求调研与分析 本项目是一个家教系统的实现,随着时代的进步,现今已经进入信息技术时代,越来越多的人注意到了教育的重要性.家长对于孩子的学习提高注意力,大家都不想自己的孩子输在起跑线上 ...

  9. 实验八 《Coderxiaoban团队》团队作业4:基于原型的团队项目需求调研与分析

    实验八 <Coderxiaoban团队>团队作业4:基于原型的团队项目需求调研与分析 项目 内容 这个作业属于哪个课程 任课教师博客主页链接 这个作业的要求在哪里 实验八 团队作业4:基于 ...

随机推荐

  1. HDU 2007

    /*杭电ACM ID:2007*/ #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main() { int in1, in2 ...

  2. PHP基础Mysql扩展库

    mysql扩展库操作步骤如下: 1.连接数据库 2.选择数据库 3.设置操作编码 4.发送指令sql,并返回结果集     ddl:数据定义语句     dml:数据操作语句     dql:数据查询 ...

  3. Mac Pro 修改主机名

    修改 主机名称 sudo scutil --set HostName jianbao-PC 修改 共享名称 sudo scutil --set ComputerName jianbao-PC

  4. JAVA 如何使JScrollPane中的JTextArea自动滚动到最后一行?

    1.要使JTextArea带有滚动条,需将JTextArea对象添加到JScrollPane中. JTextArea logArea = new JTextArea(15, 35); //创建JTex ...

  5. maven之clean、install命令

    1.进入到maven根目录,执行mvn compile命令会在根目录生成target文件(参照maven之helloworld案例),如下图: 2.执行mvn clean可将根目录下生成的target ...

  6. HPC Linux

    HPC也就是高性能计算,网格计算.服务器集群等前些日子听了Dr. Allen D. Malony讲座结束时得到两张光盘:一个HPC Linux的live cd,一个virtual box的ova镜像文 ...

  7. BZOJ3224——Tyvj 1728 普通平衡树

    1.题目大意:数据结构题,是treap,全都是treap比较基本的操作 2.分析:没啥思考的 #include <cstdio> #include <cstdlib> #inc ...

  8. bug-android之app:mergeDebugResources

    bug描述:Error:Execution failed for task ':app:mergeDebugResources'. > Crunching Cruncher seekbar_th ...

  9. hihoCoder 1303 数论六·模线性方程组

    Description 求解模线性方程组, \(m_i\) 不互质. Sol 扩展欧几里得+中国剩余定理. 首先两两合并跟上篇博文一样. 每次通解就是每次增加两个数的最小公倍数,这对取模任意一个数都是 ...

  10. OS X 添加环境变量

    这个方法相对靠谱,可用: 1, cd 到home 2, touch .bash_profile 3,open -e .bash_profile 把各个路径按如下填写: export PATH=${PA ...