基于SSH2的OA项目1.0_20161206_需求分析与框架搭建
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_需求分析与框架搭建的更多相关文章
- 基于SSH2的OA项目1.1_20161207_业务开发
1.1建立用户的pojo模型 建立user.java package org.guangsoft.pojo; import java.util.HashSet; import java.util.Se ...
- 基于全注解的SpringMVC+Spring4.2+hibernate4.3框架搭建
概述 从0到1教你搭建spring+springMVC+hibernate整合框架,基于注解. 本教程框架为基于全注解的SpringMVC+Spring4.2+hibernate4.3,开发工具为my ...
- Update(Stage5):DMP项目_业务介绍_框架搭建
DMP (Data Management Platform) 导读 整个课程的内容大致分为如下两个部分 业务介绍 技术实现 对于业务介绍, 比较困难的是理解广告交易过程中各个参与者是干什么的 对于技术 ...
- 从零开始--Spring项目整合(1)使用maven框架搭建项目
这些年一直在用spring的框架搭建项目,现在开始我们从零开始利用Spring框架来搭建项目,目前我能想到有Spring.SpringMVC.SpringJDBC.Mybatis.WebSockt.R ...
- 项目实战 - 原理讲解<-> Keras框架搭建Mtcnn人脸检测平台
Mtcnn它是2016年中国科学院深圳研究院提出的用于人脸检测任务的多任务神经网络模型,该模型主要采用了三个级联的网络,采用候选框加分类器的思想,进行快速高效的人脸检测.这三个级联的网络分别是快速生成 ...
- 零开始:NetCore项目权限管理系统:基础框架搭建
有兴趣的同学可以一起做 喜欢NetCore的朋友,欢迎加群QQ:86594082 源码地址:https://github.com/feiyit/SoaProJect 新建一个空的解决方案,建立对应的解 ...
- OA项目实战(二) 开发准备
上次的博文OA系统实践(一) 概述中,我们已经了解了OA的相关概念.从本次博文开始,我们做一个简单的OA实例. 在OA开发之前,有几个工作们需要提前做.一个是对需求进行分析,另一个是对开发环境进行选择 ...
- 《WAP团队》作业四——基于原型的团队项目需求调研与分析
基于原型的团队项目需求调研与分析 本项目是一个家教系统的实现,随着时代的进步,现今已经进入信息技术时代,越来越多的人注意到了教育的重要性.家长对于孩子的学习提高注意力,大家都不想自己的孩子输在起跑线上 ...
- 实验八 《Coderxiaoban团队》团队作业4:基于原型的团队项目需求调研与分析
实验八 <Coderxiaoban团队>团队作业4:基于原型的团队项目需求调研与分析 项目 内容 这个作业属于哪个课程 任课教师博客主页链接 这个作业的要求在哪里 实验八 团队作业4:基于 ...
随机推荐
- 【Go入门教程8】总结(25个关键字)
这一章我们主要介绍了Go语言的一些语法,通过语法我们可以发现Go是多么的简单,只有二十五个关键字.让我们再来回顾一下这些关键字都是用来干什么的. break default func ...
- Tomcat 服务器性能优化
简介 考虑一下这种场景,你开发了一个应用,它有十分优秀的布局设计,最新的特性以及其它的优秀特点.但是在性能这方面欠缺,不管这个应用如何都会遭到客户拒绝.客户总是期望它们的应用应该有更好的性能.如果你在 ...
- mysql 修改表结构
alter table 表名 modify column 字段名 varchar(数量); 将varchar(50)改为255 alter table 表名 modify column 字段名 var ...
- java web 相对路径中已/开头和不已/开头的区别
通俗的讲,有/会从跟目录开始算,没有会从当前目录开始算 1.前台页面 页面中向服务器页面请求静态资源且没有指定<base href="<%=basePath%>" ...
- 总结六条对我们学习Linux系统有用的忠告
接触linux需要的是端正自己的态度,这个玩意可不是一天两天就能拿得下的.学习个基础,能装系统.能装常见服务.能编译.能配置存储空间.能配置系统参数.能简单查看系统负载等基本够用.但这些只保证能做机房 ...
- [lintcode] Binary Tree Maximum Path Sum II
Given a binary tree, find the maximum path sum from root. The path may end at any node in the tree a ...
- vs2012+qt5.2.0环境搭建
1.安装vs2012: 2.下载Qt 5.2.0 for Windows 32-bit(VS 2012, 579 MB) 和 Visual Studio Add-in 1.2.2for Qt5 注意: ...
- Java文件操作工具类(复制、删除、重命名、创建路径)
import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import ...
- Linux ffmpeg命令的介绍与使用
ffmpeg使用语法 ffmpeg [[options][`-i' input_file]]... {[options] output_file}... 如果没有输入文件,那么视音频捕捉(只在Linu ...
- Delphi Dll 消息处理
转载:http://blog.csdn.net/lailai186/article/details/8770643 事情的导火线是GIF图片的显示. 在应用程序中, 利用三方的GIFImage.pas ...