SSM-based housing rental system [with source code]

SSM-based housing rental management system

  1. Development language: Java
  2. database: mysql
  3. Technology:Spring+SpringMVC+MyBatis+VUE+ElementUI
  4. Tools: IDEA/Ecilpse+mysql+Navicat

Roles: Admin, User

  1. Administrators can manage personal information, user information, house types, house information, rental orders, purchase orders, carousels, news announcements, message messages, etc. by logging into the system.
  2. Users register and log in to this system to browse the housing information of this system, view by category, search for housing, modify personal information, bookmark, comment, leave a message, rent a house, buy a house, etc.

insert image description here
insert image description here
insert image description here

insert image description here

insert image description here
insert image description here

Chapter 1 Preface

<template>
	<el-aside class="index-aside" width="200px">
    <div class="index-aside-inner">
      <div v-for="item in menuList" v-bind:key="item.roleName">
        <el-menu
          background-color="#263238"
          text-color="#fff"
          active-text-color="#ffd04b"
          default-active="0"
          v-if="role==item.roleName"
        >
          <el-menu-item @click="menuHandler('home')" index="0">首页</el-menu-item>
          <el-submenu
            :index="1+''"
          >
            <template slot="title">
              <span>个人中心</span>
            </template>
            <el-menu-item
              @click="menuHandler('updatePassword')"
              :index="1-1"
            >修改密码</el-menu-item>
             <el-menu-item
              @click="menuHandler('center')"
              :index="1-2"
            >个人信息</el-menu-item>
          </el-submenu>
          <el-submenu
            v-for=" (menu,index) in item.backMenu"
            v-bind:key="menu.menu"
            :index="index+2+''"
          >
            <template slot="title">
              <span>{
    
    {
    
    menu.menu}}</span>
            </template>
            <el-menu-item
              v-for=" (child,sort) in menu.child"
              v-bind:key="sort"
              @click="menuHandler(child.tableName)"
              :index="(index+2)+'-'+sort"
            >{
    
    {
    
    child.menu}}</el-menu-item>
          </el-submenu>
        </el-menu>
      </div>
    </div>
  </el-aside>
</template>
<script>
	import menu from "@/utils/menu";
	export default {
    
    
		data() {
    
    
			return {
    
    
				menuList: [],
				dynamicMenuRoutes: [],
				role: ""
			};
		},
		mounted() {
    
    
			let menus = menu.list();
			this.menuList = menus;
			this.role = this.$storage.get("role");
console.log(this.menuList)
console.log(this.role)
		},
		methods: {
    
    
			menuHandler(name) {
    
    
				this.$router.push({
    
    
					name: name
				});
			}
		}
	};
</script>
<style lang="scss" scoped>

</style>

1.1 Research Background

  The traditional way of renting a house is carried out by offline entities. Users need to go offline to actually understand traditional information. With the continuous popularization of information, more and more landlords are also keen on it for various reasons. With online development, the traditional offline model can no longer meet people's needs.

  The emergence of the Internet has brought about another rapid development of the network, and people's lives have undergone earth-shaking changes. People can enjoy the convenience and speed brought by the Internet anytime and anywhere, and all aspects of life and work can be realized on the Internet, such as making reservations for house inspections, online signing contracts, rental evaluations and other information. That is to say, the Internet has become the most direct, convenient and easy access for people.

  In today's world, with the rapid development of the Internet, how to use the Internet to create a simpler and more efficient life is our primary discussion. Relevant websites that need rental website information, on the one hand, enable administrators to update and informatize the information on the rental website network in a timely manner, obtain the required information more easily, and operate the system more accurately. This is a potential Trend, may be able to effectively accelerate the popularization of the rental website network.

1.2 Research Status

  After investigation, the pace of life of modern people is accelerating, and the pressure of life is gradually increasing. The development of the Internet brings convenience to people. With the continuous increase of online rental website information, more and more landlords have begun to join the rental website. In the tide, but our country's information management effect on online rental websites is low, and the error rate is also high. Therefore, everyone is looking for a more professional rental website.

  With the continuous appearance of rental websites, user demands continue to increase, and rental websites continue to grow. This system is mainly based on the actual needs of users and administrators. all the information to operate. The main purpose of designing this system is to facilitate users to have a very good platform experience, and administrators can also perform more convenient management operations through this system, realizing the previously specified plan.

1.3 System development goals

  For the design of the website, it is necessary to ensure that the main interface is clean and orderly, able to catch people's attention, without causing visual fatigue, and more importantly, to bring people an intuitive feeling of easy operation, so as to retain users for use. Increase the duration of three-point heat. In the background design of the system, a very simple and effective technology should be adopted, which is convenient for development and convenient for future maintenance. We not only need to ensure that all functions can meet the needs of users, but also users can take the initiative to achieve the desired operations through the website, and managers can easily understand and manage the needs of users through the website. To achieve this, the following objectives are proposed:

(1) Realize the systematization, standardization and automation of information relations in the management system;

(2) Reduce the workload of maintenance personnel and realize the control and management of information by users.

(3) It is convenient to inquire about information and manage information, etc.;

(4) Improve the efficiency of dealing with problems and increase the utilization rate of operators through network operations;

(5) Considering the diversity of users, the interface is required to be simple and easy to operate.

Chapter 2 System Development Environment

2.1 Introduction to JAVA

  Java mainly adopts CORBA technology and security model, which can protect data in Internet applications. It also provides comprehensive support for EJB (Enterprise JavaBeans), java servlet API, Java (java server pages), and XML technology. JAVA language is an object-oriented language. It provides the most basic methods to complete specified tasks. Developers only need to know some concepts to write some applications. Java programs are relatively small, and their code can run on small machines. Java is a computer programming language with three main features of encapsulation, inheritance and polymorphism, widely used in landlord web application development and mobile application development.

  The difference between the Java language and general compilers and literal translation is that Java first converts the source code into bytecode, and then converts it into an executable file for the JVM, which can run on various JVMs. Therefore, its cross-platform characteristics are realized. While this made Java very slow in its early days, it has improved as Java has been developed.

2.2 MySql database

  The language of Mysql is unstructured, and users can work on the data. MySQL gets a lot of attention for its speed, reliability, and adaptability. Most people agree that MySQL is the best choice for managing content when transactional processing is not required. And because the language and structure of Mysql are relatively simple, but the function and the amount of stored information are very powerful, it has been widely used.

  The role of Mysql database in the programming process is very extensive, which brings great convenience for users to query data. Because of its flexibility and powerful functions, the application of Mysql database only needs a small piece of code to realize a certain function, unlike other programs that need to write a large piece of code. Generally speaking, the language of Mysql database is relatively concise.

  Data flow analysis is mainly a storage room for data storage, which is performed on a computer, not a storage room in reality. Data is stored in a fixed format rather than in disorder. Its definition is: it has a fixed format for a long time and can be shared and stored on the computer memory. Database management is mainly data storage, modification and addition, and the establishment of data tables. In order to ensure the normal operation of the system data, some capable processors can manage it without the need for professional people to handle it. The establishment of the data table can adjust the data in the data table, recombine and reconstruct the data to ensure the security of the data. Due to the powerful features of the database, the development of this system mainly uses Mysql to manage the data.

2.3 B/S Architecture

  There are also many features of the B/S structure, for example, signal requests can be made in many browsers. And it can properly reduce the user's workload. By installing or configuring a small amount of running software on the client, the user's workload can be gradually reduced. The operation of these functions is mainly controlled by the server. Mature, the most important feature is that the cooperation with the browser brings great convenience to software development. It can not only reduce development costs, but also continuously strengthen the software functions of the system. The layers are independent of each other and the presentation layer is the B/S The structure completes the main features of the interconnection.

2.4 Spring Boot framework

  Spring Boot is a new framework from the Pivotal team aimed at simplifying the initial setup and development of new Spring applications. The framework uses a specific configuration approach, eliminating the need for developers to define boilerplate configurations. In this way, Spring Boot aims to be a leader in the burgeoning field of rapid application development.
Spring Boot features:
1. Create a separate Spring application;
2. Embedded Tomcat, no need to deploy WAR files;
3. Simplify Maven configuration;
4. Automatically configure Spring;
5. Provide production-ready functions, such as indicators, health checks and External configuration;
6. Absolutely no code generation and XML configuration requirements;
installation steps:
at its most basic, Spring Boot is a collection of libraries that can be used by any project's build system. For simplicity, the framework also provides a command line interface that can be used to run and test Boot applications. Published versions of the framework, including the integrated CLI (command line interface), can be downloaded and installed manually from the Spring repository. An easier way is to use the Groovy enVironment Manager (GVM), which handles Boot version installation and management. Boot and its CLI can be installed from the GVM command line GVM install springboot. The Homebrew package manager can be used when installing Boot on OS X. To complete the installation, first switch to the pivotal repository using brew tap pivotal/tap and then execute the brew install springboot command.

2.5 ECLIPSE development environment

  ECLIPSE has wide support, high compatibility and powerful functions. It is a collection of Eclipse plug-ins, which are generally suitable for JAVA and J2EE system development. It supports JDBC, Hibernate, AJAX, Struts, Java Servlet, Spring, EJB3 and almost all databases on the market. Link tools and mainstream Eclipse product development tools.

  ECLIPSE is a well-known development tool in the industry, and this platform uses this tool during the development process. ECLIPSE is also known as the landlord-level work platform, which is based on Eclipse IDE. ECLIPSE can help us develop the database and use J2EE. In addition, it can also improve the operating capability of the system, which is prominently reflected in the server integration process. The functions of ECLIPSE are quite complete, and it can provide the necessary environmental support for the integration of J2EE, so as to complete functions such as coding, testing, debugging and publishing. It can support Java, HTML, SQL, Javascript, Struts, CSS, etc.

Chapter 3 Requirements Analysis

3.1 Demand Analysis

  In the process of developing the system, it is particularly important to investigate the user's functional demands and analyze the needs of the functions that need to exist, and it has practical significance for the development of the system. The design of the rental website analyzes the needs of users and combines the actual situation Conduct development research, make a complete basic framework for all the needs of users, and then complete and realize them step by step. Requirements analysis can provide a goal for the development of the system. Only by developing and designing according to this goal can a complete development be carried out. In this way, the designed system can be used meaningfully, survive in the fiercely competitive software market, and truly help People solve problems and improve practical efficiency.

3.2 System Feasibility Analysis

3.2.1 Technical Feasibility

  This system adopts the most widely used program for technical support. The main technical support is java language. As a quite mature language program, it plays a very important role in many software developments. Moreover, the program edited in java language can be run directly without the help of other translators for translation. So it is completely feasible technically.

3.2.2 Economic feasibility

  The original intention of this project development is to save money, because all the process of system development is developed by myself, and the technologies used in the development process are also common and easy to operate on the market, so there is no need to hire professionals to spend money To develop the system, and I also learned more knowledge during the project development process. The developed software can be downloaded free of charge in the network, and does not have high requirements for computer software and hardware, so this project is very affordable and completely feasible in terms of economy.

3.2.3 Operational Feasibility

  Operational feasibility is the usability of the system. Whether the operation of a system is easy determines the usability of the system. I adopt a simple and easy-to-understand method for the design of the system operation. The entire menu interface of the operation is neat and orderly. The functions of the system are arranged in an orderly manner, there will be no overlap or need to be converted, and users can directly operate any operation they want, so anyone can operate the system without relevant professional technology. It is much easier to operate.

3.3 Project Design Goals and Principles

1. Basic requirements on rental websites

(1) Functional requirements: home page, personal center, user management, housing type management, housing information management, appointment viewing management, online contract management, lease evaluation management, exchange forum, system management and other functional modules.

(2) Performance: Because a lot of information needs to be stored in the rental website management, there is a great requirement for the storage capacity of the system, and a powerful database is needed to ensure that all information can be stored safely and stably.

(3) Security and confidentiality requirements: users must register and log in to enter the system.

(4) Environmental requirements: support Windows series, Vista system and other operating systems.

2. Design principles

This rental website adopts Java technology and Mysql database development, which fully guarantees the stability and integrity of the system.

(1) System response efficiency: Since it is a rental website, the response efficiency of the system needs to be very high, and it can support many people to use the system at the same time.

(2) Simple and clear interface: The system interface should be simple and orderly, and all functions can be seen at a glance.

(3) High storage capacity: because it is a rental website, the database requirements are stricter, and the information is entered more frequently, and it is rich and complex. This requires a powerful database to store more data and ensure data is always available. sex.

(4) Ease of learning: The design of the system must be simple so that users can use it very easily.

(5) Stability requirements: The system must remain stable during use, without freezing or blurring.

(6) Stability: Since it is a rental website, the system operation must be very stable.

4 Database table design

  When the rental website is running, the database must be able to ensure its own independence, select the corresponding setting option for the part of the data you want, and the corresponding data will be displayed in the form of a table. When this function is set, it will connect to the database, and the corresponding data source will pop up in the dialog box.

Table 4-1 allusers table

column name type of data length constraint
id int 11 NOT NULL
username varchar 50 default NULL
pwd varchar 50 default NULL
cx varchar 50 default NULL

Table 4-2 Fangwuxinxi table

column name type of data length constraint
id int 11 NOT NULL
addtime varchar 50 default NULL
fangwumingcheng varchar 50 default NULL
fangwuleixing varchar 50 default NULL
tupian varchar 50 default NULL
zulinfangshi varchar 50 default NULL
chaoxianglouceng varchar 50 default NULL
mianji varchar 50 default NULL
fangwuzhuangtai varchar 50 default NULL
xiaoqu varchar 50 default NULL
xiangxidizhi varchar 50 default NULL
yuezujiage varchar 50 default NULL
the strike varchar 50 default NULL
fangwuxiangqing varchar 50 default NULL
Faburiqi varchar 50 default NULL

Table 4-3: Yonghu table

column name type of data length constraint
id int 11 NOT NULL
addtime varchar 50 default NULL
yonghuming varchar 50 default NULL
mima varchar 50 default NULL
xingming varchar 50 default NULL
xingbie varchar 50 default NULL
touxiang varchar 50 default NULL
shouji varchar 50 default NULL
shenfenzheng varchar 50 default NULL

Table 4-4: yuyuekanfang table

column name type of data length constraint
id int 11 NOT NULL
addtime varchar 50 default NULL
yuyuebianhao varchar 50 default NULL
fangwumingcheng varchar 50 default NULL
fangwuleixing varchar 50 default NULL
tupian varchar 50 default NULL
mianji varchar 50 default NULL
fangwuzhuangtai varchar 50 default NULL
xiaoqu varchar 50 default NULL
yuezujiage varchar 50 default NULL
zulinyueshu varchar 50 default NULL
zulinjine varchar 50 default NULL
the strike varchar 50 default NULL
yuyueriqi varchar 50 default NULL
yonghuming varchar 50 default NULL
shouji varchar 50 default NULL
shenfenzheng varchar 50 default NULL
sfsh varchar 50 default NULL
shhf varchar 50 default NULL

Table 4-5: zaixianqianyue table

column name type of data length constraint
id int 11 NOT NULL
addtime varchar 50 default NULL
hetongbianhao varchar 50 default NULL
fangwumingcheng varchar 50 default NULL
fangwuleixing varchar 50 default NULL
xiaoqu varchar 50 default NULL
yuezujiage varchar 50 default NULL
zulinyueshu varchar 50 default NULL
zulinjine varchar 50 default NULL
the strike varchar 50 default NULL
hetongjine varchar 50 default NULL
shengxiaoriqi varchar 50 default NULL
youxiaoqizhi varchar 50 default NULL
hetongneirong varchar 50 default NULL
yonghuming varchar 50 default NULL
shouji varchar 50 default NULL
sfsh varchar 50 default NULL
shhf varchar 50 default NULL

Chapter 6 System Testing

6.1 Test purpose

  随着互联网不断的发展,目前各大领域都利用互联网进行了信息的管理,质量问题是很重要的标准,也决定着是否有更多的人使用。所以软件的质量我们必须要把关,必须要把软件做好,做到位,少出不必要的问题,这样才能有更多的用户使用,并且得到更多的推广。所以,我们在开发完系统后,需要进行大量的测试,以确保系统的稳定性和可使用性,并要确定系统的质量能否做到满足不同人的需求。这是系统在开发设计中非常重要的环节,测试的结果直接关系到系统的好坏。

  集成测试:在系统测试当中会出现很多的问题,我们要及时的进行标注并且在进行测试的时候要采取自动化的测试,这样即准确又快速,而且不会出现疲劳,手动的测试很容易出现疲劳期,而且测试的结果也有时候会出错,所以在测试的时候才去自动测试时最好的测试方法。

  在测试的过程中及时的发现问题,并且进行问题的解决,这样设计出的系统可以正常稳定的运行,不会出现重大的问题。我所进行的软件测试参照以下三个步骤进行测试:

(1)模块测试:对系统中的每一项都进行针对的测试,发现并找到问题。

(2)系统测试:让系统长时间进行各种情况下的运行,反馈运行期间的稳定性问题并解决。

(3)验收测试:其他测试完成后,最后检测阶段,确保软件准备就绪。

6.2 测试方法

  在对系统进行测试的时候我们主要应用到两种测试的方法,通过测试我们就能找出可能存在的问题保证系统成功运行。

  从软件的内部构造和具体实施是否有关系的观点来看:黑盒测试和白盒测试。

1)黑盒测试:测试系统功能,当用户进行相应的操作时,系统是否能够及时且准确的反馈数据,并执行相应功能。需要对功能以及使用方法进行详细的测试,保证所有的操作信息都能够完整的输出输入。

2)白盒测试:主要是对系统的结构进行测试,了解系统在运行过程中是否可以正常的工作。

租房网站的测试也会从下面几方面进行:

(1)窗体测试:例如用户登录界面,在用户名和密码输入时,需要界面窗口弹出,给予用户反馈,我对窗口的设计进行了测试,确保每一个窗口在用户进行相应操作后,能够及时的弹出。

(2)数据跟踪:进行数据跟踪,我们就能知道系统功能是否在顺利的执行当中。将数据库中的相关的信息进行调动,弹出我们需要的相对应的数据信息。同时,在追踪过程中,我们也更容易的发现系统的问题所在,便于解决问题和维护系统。

(3)综合测试:完成上述测试后,需要对系统进行由内而外的重新检测,来宏观的发现系统中存在的问题,并且及时的进行解决,系统的设计要结合实际的使用情况有针对性的进行开发,可以满足不同人的需求。

6.3 功能测试

  本租房网站设计基本达到我理想的开发状态,在各个功能的运行方面,表现较为良好,基本满足用户的使用需求,及时矫正了较多的错误信息。总体说来,软件通过了相应的测试。

表6-1:用户登录测试表

模块名称 测试用例 预期结果 实际结果 是否通过
登录模块 用户名:001 密码:123 弹出错误提示,提示密码错误 弹出错误提示,提示密码错误 通过
登录模块 用户名:123 密码:002 弹出错误提示,提示用户名错误 弹出错误提示,提示用户名错误 通过
登录模块 用户名:001 密码:001 管理员登录成功 管理员登录成功 通过

表6-2:删除房屋信息管理测试表

模块名称 测试用例 预期结果 实际结果 是否通过
删除房屋信息管理模块 房屋信息管理名:最新通知 删除成功、页面自动跳转 删除成功、页面自动跳转 通过

表6-3:修改密码测试表

模块名称 测试用例 预期结果 实际结果 是否通过
修改密码模块 原密码:666 新密码:123 确认密码:123 弹出错误提示,提示原密码错误 弹出错误提示,提示原密码错误 通过
修改密码模块 原密码:001 新密码:123 确认密码:333 弹出错误提示,提示确认密码不一致 弹出错误提示,提示确认密码不一致 通过
修改密码模块 原密码:001 新密码:123 确认密码:123 密码修改成功 密码修改成功 通过

6.4 测试结论

  测试的过程要按照指定好的计划一步一步的实行,测试时候一定不要着急,并且将测试的结果进行详细的记录,我们在进行测试的时候做好选择自动化的测试,这样更加的准确也更快捷,如果采用人工测试的方法就不会这么的方便,很可能会出现一些问题,而且极其测试不会疲劳也不会出现问题。在测试的时候一定要非常专注,时刻关注着测试的结果,一旦发现异常及时进行修改,;最后,测试完之后的文档应该保存下来,方便以后测试时用到。

  通过测试,我们也可以直观的感受到,在我们最开始进行系统设计的时候,先把思路理清楚,才能有机会把代码写好。有好的逻辑性的代码在后期的测试中才能避免出现问题,也可以给我们节省很多的时间和不必要的操作。

第7章 结 论

   租房网站为用户提供了公平的、相互包容的、操作方便的使用系统,基本满足了用户的使用需要,以及我最初的开发目标和方向。Java语言、MySQL数据库等技术时是我开发的基础,这些技术都有各自的优点,学好这些技术,至关重要。通过这些优点设计出来的系统能够正常稳定的运行,并且可以满足人们的所有需求,在对系统的需求以及各个模块进行了详细的分析后,有针对性的进行设计,最后通过测试,系统能够正常的运行,该租房网站设计完成。

  本次开发过程中使用的是Java技术,该技术具有代码编写简单方便,对平台没有要求对技术方面也没有要求,并且有很好的面像对象性,所以在技术方面是相当成熟的。利用springboot框架作为系统主要的技术支持可以使得系统能够正常的运行并且实现相应的功能。在这次的系统的设计过程中遇到了很多的困难,幸好有老师同学们的帮助,在他们的帮助下完成了这次系统的设计。

  通过这次租房网站的开发,我参考了很多相关系统的例子,取长补短,吸取了其他系统的长处,逐步对该系统进行了完善,但是该系统还是有很多的不足之处,有待以后进一步学习。

  实践证明,租房网站有着非常好的发展前景,经过测试运行,系统各项功能都十分完善,界面漂亮,使用方便,操作容易,在技术理论上已经成熟。

参考文献

[1] 贝伊利 (Lynn Beighley),莫里森 (Michael Morrison),苏金国, 徐阳. Head First Java & MySQL(中文版)[M]. 中国电力出版社,2018,03.

[2] 潘凯华,刘中华, 等. Java开发实战1200例(第1卷)(附DVD-ROM光盘1张)[M]. 清华大学出版社,2019,01.

[3] 帕蒂拉(Armando Padilla),霍金斯(Tim Hawkins),盛海艳,刘霞. 高性能Java应用开发[M]. 人们邮电出版社,2019,11.

[4] 陈益材,等. Java+MySQL+Dreamweaver动态网站建设从入门到精通(附多媒体语音教学光盘)[M]. 机械工业出版社,2019,06.

[5] 高洛峰,LAMP兄弟连. 细说Java(精要版)(附DVD光盘1张)[M]. 电子工业出版社,2018,06.

[6] Lorna Mitchell,等. Java精粹:编写高效Java代码[M]. 机械工业出版社,2018,10.

[7] 列旭松,陈文. Java核心技术与最佳实践[M]. 机械工业出版社,2018,07.

[8] Symfon,CakeJava,Zend Bartosz Porebski,Karol Przystalski,Leszek Nowak, 付勇. Java框架高级编程:应用[M]. 清华大学出版社,2017,02.

[9] 波诺赛克 (Boroncxyk.T.),Elizabeth Naramore,薛焱. Web开发入门经典:使用Java6、Apache和MySQL[M]. 清华大学出版社 ,2017,07.

[10] 辛洪郁,张鑫. Java项目开发全程实录(第3版)[M]. 清华大学出版社,2018,11.

[11] 杨宇,等. Java典型模块与项目实战大全(附DVD-ROM光盘1张)[M]. 清华大学出版社,2018,01.

[12] 贾素来.常见动态网页技术比较[J].大众科技,2018,9.

[13] 西尔伯沙茨(Silberschatz.A.) . 计算机科学丛书:数据库系统概念(原书第6版)[M]. 机械工业出版社,2019,03..

[14]萨师煊,王珊.数据库系统概论[M].北京:高等教育出版社,2018:10-180.

[15]陈刚.Eclipse从入门到精通[M].(第2版).北京:清华大学出版社,2018:17-380.

[16] Sun Weiqin. Proficient in Struts: MVC-based Java Web design and development [M]. Beijing: Electronic Industry Press, 2017: 19-421

Guess you like

Origin blog.csdn.net/2301_78335941/article/details/131056387
Recommended