Design and implementation of garbage classification website based on springboot [graduation thesis, source code]

Summary

This paper mainly discusses how to use JAVA language to develop a garbage sorting website. This system will strictly follow the software development process for each stage of work, using B/S architecture and object-oriented programming ideas for project development. In the introduction, the author will discuss the current background of the garbage sorting website and the purpose of system development, and the subsequent chapters will strictly follow the software development process to analyze and design the system at each stage.

The main users of the garbage sorting website are divided into administrators, users, and garbage sorting administrators. The functions include administrators: home page, personal center, user management, garbage sorting administrator management, garbage sorting management, garbage type management, and garbage map management. , system management, garbage sorting administrator; home page, personal center, user management, garbage sorting administrator management, garbage sorting management, garbage type management, garbage map management, user front desk; home page, garbage sorting, garbage map, personal center, background Management and other functions. Due to the relatively comprehensive design of functional modules of this website, the process of information management of the entire garbage classification website can be realized.

The use of this system can realize the informatization of the management of this garbage classification website, which can facilitate the administrator to perform more convenient and quick management, and can improve the work efficiency of the administrator.

Keywords: JAVA language of garbage classification website; MYSQL database; Spring Boot framework

Abstract

This paper mainly discusses how to use java language to develop a garbage classification website. The system will work in all stages in strict accordance with the software development process, using B / S architecture and object-oriented programming ideas for project development. In the introduction, the author will discuss the current background of the garbage classification website and the purpose of the system development. The following chapters will analyze and design the system in each stage in strict accordance with the software development process.

The main users of garbage classification website are administrator, user and garbage classification administrator. The functions include administrator: home page, personal center, user management, garbage classification administrator management, garbage classification management, garbage type management, garbage map management, system management, garbage classification administrator; home page, personal center, user management, garbage classification administrator Management, garbage classification management, garbage type management, garbage map management, user foreground; home page, garbage classification, garbage map, personal center, background management and other functions. Because the function module design of this website is more comprehensive, so the whole process of garbage classification website information management can be realized.

The use of this system can realize the information management of the garbage classification website, which can facilitate the administrator to manage more conveniently and quickly, and improve the work efficiency of the management personnel.

Key words: garbage classification website Java language; MySQL database; spring boot framework

Table of contents

Abstract I

1 Introduction 1

1.1 Research Background 1

1.2 Research status 1

1.3 Research content 2

2 System key technology 3

2.1 Spring Boot Framework 3

2.2 JAVA Technology 3

2.3 MYSQL database 4

2.4 B/S structure 4

3 System Analysis 5

3.1 Feasibility analysis 5

3.1.1 Technical feasibility 5

3.1.2 Economic feasibility 5

3.1.3 Operational Feasibility 5

3.2 System Performance Analysis 5

3.3 System function analysis 6

3.4 System flow analysis 7

3.4.1 Login process 7

3.4.2 Registration Process 8

3.4.3 Add information process 8

3.4.4 Delete information process 9

4 System Design 10

4.1 System outline design 10

4.2 System structure design 10

4.3 System sequence diagram design 11

4.3.1 Login module sequence diagram 11

4.3.2 Add information module sequence diagram 11

4.4 Database Design 12

4.4.1 Database ER Diagram Design 12

4.4.2 Database Table Design 13

Chapter 5 System Detailed Design 17

5.1 User front desk function module 17

5.2 Administrator function module 18

5.3 Garbage Sorting Administrator Function Module 21

6 System Test 24

6.1 Test Definition 24

6.2 Test purpose 24

6.3 Test scheme 25

(1) Module Test 25

(2) Integration tests: 25

(3) Acceptance test: 25

6.4 System Analysis 27

7 Conclusion 28

Reference 29

Thanks 30

1 Introduction

1.1 Research Background

With the continuous popularization and development of the Internet, garbage classification websites have developed rapidly relying on the support of network technology. First, we must start from the actual needs of users and develop targeted garbage classification, garbage maps and other functions by understanding the needs of users. The system is adjusted by taking advantage of the convenience and speed brought by the current network to users. The designed system makes users more convenient to use. The main purpose of this system is to bring users fast, efficient and safe. Operation [1] is possible. At the same time, with the development of e-commerce, online garbage sorting websites have attracted the attention of the majority of users.

Since the development of the Internet, it has solved many problems that we cannot solve, making our work more convenient and improving our work efficiency. At present, all walks of life are using network information management programs, and different users are also exposed to information management, especially in major e-commerce industries. Through the analysis and summary of the development of the current network environment, the development of garbage classification websites can change the previous manual statistical methods and the status of traditional offline garbage classification websites. It is far from satisfying the needs of users, and more and more merchants are opening online garbage sorting websites, so developing a garbage sorting website can solve the problem that merchants are not conducive to offline garbage sorting websites. At the same time, merchants can use the Internet to Waste classification information is managed, and the designed website ensures the integrity and security of information, so as to improve work efficiency and ensure the safe and normal operation of the system [2].

1.2 Research Status

The development of their information technology in foreign countries is many times that of our country. Since the world's first computer was born in the United States in 1946, foreign information technology has been developing rapidly, and some computer application software has also appeared one after another. Software technology It has also been continuously improved and updated [3]. The software industry has long been everywhere.

In China, the development of information technology in our country started relatively late, and we slowly and continuously optimized and reformed in the later period, so that our information technology rose to a new stage. Nowadays, the technology of software development can basically reach the level of independent development system application after a lot of research and life practice, and various industries in life also replace software operation with traditional recording mode. The software industry is the hottest industry now [4].

Socialism has entered a new era, and its economic strength is getting stronger and stronger. We are also becoming more and more busy, the requirements for life are becoming more stringent, and the demand for fast and convenient services is gradually increasing, so the development of online garbage classification websites has brought enough convenience to users. Therefore, due to the increase of information, the information processing system also increases to meet the needs of modern users through the network [5]. This development and design is mainly to realize the garbage sorting website, combined with java technology and MYSQL database design, to make up for the shortcomings of the current online garbage sorting website, to develop a convenient and practical garbage sorting website, and the designed program has an interface Cleanliness, powerful functions, etc. Overall, the design of the garbage classification website solves the scattered information. The system can be implemented and put into a real environment. This will not only solve the above-mentioned problems, but also make information management more standardized.

1.3 Research content

The development and design of the garbage sorting website is based on the actual situation of the user, and the system requirements are analyzed in detail, and then the overall design of the system is carried out. Finally, the system design is more complete through testing, and all functions in the system can be realized. Before starting to write the thesis, I personally went to the library to borrow Spring Boot books, MYSQL database books and other programming books, and then for the developed garbage classification website, I went to the Internet to find a lot of systems made by others. The system carries out a more detailed system design, lists all the functional results in the system one by one, then conducts demand analysis, and finally codes all the functional modules, and finally completes the overall system test to realize the normal operation of the system[6] .

The thesis written this time contains 6 parts, the specific contents are as follows:

The first part is introduction: the article mainly expounds the necessity of developing this system comprehensively from the subject background and research status.

The second part related technologies: various technologies used in system development are roughly introduced.

The third part of the system analysis: the feasibility analysis of the system and the detailed analysis of all functional requirements to check whether the system has the possibility of development.

The fourth part, system design: function module design and database design, both of which have special tables and pictures.

The fifth part of the system implementation: display the interface of the main functional modules of the system.

The sixth part is system test: test whether each function of the system can run normally and meet the needs of users.

2 Key technologies of the system

2.1 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 features, 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.2 JAVA technology

The JAVA language is currently the most widely used language development program in the software market. It can be used on a variety of platforms, has strong compatibility, adapts to most operating systems on the market, does not appear garbled characters, has better scalability and maintainability, and has the ability to analyze and solve problems. Process-oriented programming allows us to write more robust code.

Compared with other languages, JAVA is relatively simple, more convenient to compile, and has high security and reliability. According to incomplete statistics, there are more than 20 million people in the world using it. JAVA can be used both inlaid and independently. JAVA can be roughly divided into two parts, one part is the compilation that JAVA is responsible for, and the other is the operation that JAVA is responsible for. JAVA is very similar to C++ language, but JAVA is compiled in an object-oriented way when programming, so that the compiled software can be used on a stand-alone computer or on the Internet, and it is more convenient to check for errors. The distributed and architecture-neutral characteristics of JAVA also make its storage faster and programming simpler. Object-oriented includes four characteristics, one is encapsulation, which means that certain functions and attributes can be realized when defining a class. The second is abstraction, which is a kind of class. It can encapsulate a class with common attributes in an abstraction, which is convenient for simple compilation. The third is inheritance, as the name implies, it has the characteristics of the former. Another feature is polymorphism, which can be used together, showing its good scalability [8].

2.3 MYSQL database

The development of the website must be equipped with a corresponding database. The database has a certain organizational structure and can store and manage data information. In the past, the function of the database was only data storage and management operations, but with the changes and development of the times, the current database has evolved into data processing. In this way, the database has undergone many reforms from the initial simple storage of data table information to the current large database that can store thousands of data.

The database used by the garbage sorting website developed this time is MYSQL database, which runs fast, has high security performance, and has no restrictions on the platform used, so it is widely used in the development of the system. MySQL is an open-source and multi-threaded relational management database system. MySQL is an open-source database with cross-platform features. Although the functions may not be powerful, many people understand the basic application of this database. In the database, a total of 10 Several tables, each of which is corresponding, each has its own connection, the database is of great significance, if there is no link to the database, there is no way to run the program, which obviously shows the importance of the database and the program, is closely linked [9].

2.4 B/S structure

The B/S (browser/server) structure is the current mainstream network structure model. It can concentrate the core functions of the system on the server, and can help system developers simplify operations and facilitate maintenance and use. Users only need to install 360 browser, Google browser, QQ browser and other popular browsers on the client side, and install databases such as sqlserver and mysql database in the computer [10]. The installed browser interacts with the server-side database for information and data. Many things that special software can do can also be realized by using the B/S structure mode, which can combine technologies such as Web browser technology, ActiveX technology and various scripting languages. Help program developers save a lot of development costs. At present, the B/S structure has become the mainstream structure of program development. Its best feature is that it has no location restrictions and does not need to install special software. Laptops or computers can access the system with Internet access. The system uses B/S for development, which will save trouble in the later system maintenance. It does not need to operate on the server for all problems. Simple client-side processing can solve some problems. The developed program will also enhance the interaction with users. The browser can be refreshed in real time to update the local data information of the program.

Figure 2-1 B/S mode three-layer structure diagram

3 System Analysis

3.1 Feasibility Analysis

3.2 System performance analysis

3.3 System function analysis

3.4 System flow analysis

4 System Design

4.1 System outline design

4.2 System structure design

The whole system is composed of multiple functional modules. All the functional modules should be listed one by one, and then the functional design should be carried out one by one, so that each module has a corresponding functional design, and then the overall design of the system can be carried out. .

The structure diagram of this garbage classification website is shown in Figure 4-2.

Figure 4-2 System function structure diagram

4.3 System sequence diagram design

4.3.1 Login module sequence diagram

Figure 4-3 Login sequence diagram

4.3.2 Add information module sequence diagram

Figure 4-4 Sequence diagram for adding information

4.4 Database design

A good database can be related to the pros and cons of program development. Database design is inseparable from the design of the table structure, as well as the relationship between tables, and the content of the data table that needs to be designed for system development. During the database design period, it is necessary to carry out targeted development and design of the database in combination with the actual situation [12].

4.4.1 Database ER Diagram Design

本垃圾分类网站采用的是MYSQL数据库,数据存储快,因为垃圾分类网站,主要的就是对信息的管理,信息内容比较多,这就需要好好的设计一个好的数据库,分类要清楚,不能添加信息的时候,造成信息太过混乱,设计好的数据库首先就需要先把各个实体之间的关系表达明确,系统的E-R图如下图所示:

1、用户信息实体图如图4-5所示:

图4-5 用户信息实体图

2、垃圾分类信息实体图如图4-6所示:

图4-6 垃圾分类信息实体图

3、垃圾分类管理员信息实体图如图4-7所示:

图4-7 垃圾分类管理员信息实体图

4.4.2数据库表设计

第5章 系统详细设计

5.1用户前台功能模块

垃圾分类网站,在系统首页可以查看首页、垃圾分类、垃圾图谱、个人中心、后台管理等内容,如图5-1所示。

图5-1系统功能界面图

用户登录、用户注册,在用户注册页面可以填写账号、密码、姓名、手机、邮箱、地址等信息进行注册、登录,如图5-2所示。

图5-2用户登录、用户注册界面图

垃圾分类,在垃圾分类页面通过填写垃圾名称、垃圾类型、规格、数量、图片等信息进行提交,如图5-3所示。在垃圾图谱页面通过填写垃圾名称、垃圾类型、图谱等信息进行提交操作,如图5-4所示。

图5-3垃圾分类界面图

图5-4垃圾图谱界面图

5.2管理员功能模块

管理员登录,通过填写注册时输入的用户名、密码、角色进行登录,如图5-5所示。

图5-5管理员登录界面图

管理员登录进入垃圾分类网站可以查看首页、个人中心、用户管理、垃圾分类管理员管理、垃圾分类管理、垃圾类型管理、垃圾图谱管理、系统管理等信息。

用户管理,在用户管理页面中可以通过填写账号、密码、姓名、手机、邮箱、地址等内容进行修改、删除,如图5-6所示。还可以根据需要对垃圾分类管理员管理进行详情,修改或删除等详细操作,如图5-7所示。

图5-6用户管理界面图

图5-7垃圾分类管理员管理界面图

垃圾分类管理,在垃圾分类管理页面中可以填写垃圾名称、垃圾类型、规格、数量、图片等信息,并可根据需要对已有垃圾分类管理进行修改或删除等操作,如图5-8所示。

图5-8垃圾分类管理界面图

垃圾类型管理,在垃圾类型管理页面中可以填写类型等信息,并可根据需要对已有垃圾类型管理进行修改或删除等详细操作,如图5-9所示。

图5-9垃圾类型管理界面图

垃圾图谱管理,在垃圾图谱管理页面中可以查看垃圾名称、垃圾类型、图谱等内容,并且根据需要对已有垃圾图谱管理进行详情,修改或删除等详细操作,如图5-10所示。

图5-10垃圾图谱管理界面图

轮播图;该页面为轮播图管理界面。管理员可以在此页面进行首页轮播图的管理,通过新建操作可在轮播图中加入新的图片,还可以对以上传的图片进行修改操作,以及图片的删除操作,如图5-11所示。

图5-11轮播图管理界面图

5.3垃圾分类管理员功能模块

垃圾分类管理员登录进入垃圾分类网站可以查看首页、个人中心、用户管理、垃圾分类管理员管理、垃圾分类管理、垃圾类型管理、垃圾图谱管理等内容。

个人信息,在个人信息页面中通过填写管理员账号、管理员姓名、密码、性别、年龄、联系电话、电子邮箱等信息,还可以根据需要对个人信息进行修改、删除如图5-12所示。

图5-12个人信息界面图

6 系统测试

一个系统设计好后,就会进入测试阶段,测试的目标是检验设计好的网站是否可以正常无误的运行,尽可能的发现网站的问题,已使后期网站投入使用后网站尽少出错[12]。

6.1 测试定义

6.2 测试目的

6.3测试方案

6.4系统分析

7 结论

本文研究了垃圾分类网站的设计与实现,在文章开端首先对个研究背景、研究现状和研究内容作了简单的介绍,然后通过系统分析,引申出本系统研究的主要内容。

通过对Java语言和MYSQL数据库的简介,从硬件和软件两反面说明了垃圾分类网站的设计与实现的可行性,本文结论及研究成果如下:实现了Java与MYSQL相结合构建的垃圾分类网站,我感触到学习一门新技术,最重要的是实践,只有多动手才能尽快掌握它,一个系统的开发,经验是最重要的,经验不足,就难免会有许多考虑不周之处。要想吸引更多的用户,系统的界面必须要美观、有特色、友好,功能要健全。

由于在此之前对于Java知识并不了解,所以从一开始就碰到许多困难,例如一开始的页面显示不规范、数据库连接有问题已经无法实现参数的传递等等,不过通过我不断的查阅相关的资料,以及向老师同学请教,最后出现的所有的问题都得到了解决,通过这次的系统开发,我学到了很多的知识,也明白了自己在哪些方面有不足的地方,尤其是学会如何从大量的信息中筛选出所需有用的信息,同时我更加深刻的体会到了,虽然书本上的大部分知识都是有价值,正确的,但实际上每个人编程的思路和对数据处理的方法、思想都是不同的,这就要求我们一定要通过实践才能找到解决问题的方案。在此次毕业设计活动中,我不断的提高了自己,也得到了宝贵的经验,我相信这些对我以后的发展都会有很大帮助。

通过这次垃圾分类网站的开发,让我学到了更多的知识,同时通过这次系统的设计也让我明白了自己在哪方面有不足,以后加以学习争取可以开发住更多有用的适用的系统软件,本次系统的设计提高了我的编程水平,为了我今后系统的开发打下了结实的基础。

参考文献

[1] 王玉英. 基于Java的MySQL数据库访问技术[J]. 现代计算机:专业版, 2018, 19(14):63-66

[2] 陈Maydene Fisher, Jon Ellis, Jonathan Bruce著. JDBC API Tutorial and Reference, Third Edition. 11 June, 2018[3] Jason Brittain Ian F.Darwin[美]. Tomcat权威指南. 北京:中国电力出版社,2018.

[4] 石正喜. MySQL数据库实用教程. 北京:北京师范大学出版社 2019

[5] 张海潘.软件工程理论[M] .北京:清华大学出版社,2017.

[6] Patrick O’Neil Elizabeth O’Neil[英]等.数据库-原理、编程与性能(第二版 影印版)[M].北京:高教育出版社,2017.

[7] 王雨竹. MySQL入门经典. 北京:机械工业出版社 2017[8] 邓子云.Java网络编程从基础到实践[M].北京:电子工业出版社,2019.

[9] 陈圣国.Java信息系统设计与开发实例[M].北京:机械工业出版社,2019.

[10] Todd Cook. Java从入门到精通[W].北京:电子工业出版社,2019.

[11] Bruce Eckel. Thinking in java(English Edition). 北京:机械工业出版社,2019

[12] Hsiao I H, Sosnovsky S, Brusilovsky P. Guiding students to the right questions: adaptive navigation support in an e-learning system for Java programming[J]. Journal of Computer Assisted Learning, 2018, 26(4):270-283.

[13] Vegh A. MySQL Database Server[M]. Web Development with the Mac®. Wiley Publishing, Inc., 2019,179-194

[14] Rasoolzadegan A, Barforoush A A. Reliable yet flexible software through formal model transformation (rule definition)[J]. Knowledge & Information Systems, 2019, 40(1):79-126

谢辞

本次毕业设计圆满的结束了,通过这次毕业设计我学到了很多的知识,也提高了我软件开发的能力,在系统开发设计的过程中,出现了很多的问题,但是通过老师和同学们的帮助,最后所有的问题都得到了解决,因此我要感谢在此过程中对我帮助的老师和同学们,感谢指导老师帮助我选课题,给我做详细的讲解,给我提供设计所需要的各种设备,也经常询问我进度与成果,再有难点的时候给我解决思路,帮助我顺利完成。没有他的指导,也不会有我今天所展现出的成果。

首先我要感谢我的指导老师,指导老师在教学任务繁忙的情况下,抽出时间帮助我纠正我在设计当中出现的问题,并耐性地为我的论文作校正,是他的定期检查和指导使得我们的毕业设计高质量完成。他在我整个课题开发和设计的过程中,为程序的设计、框架的设计、代码的撰写方面以及论文框架的设计提供了很多宝贵的意见,并且为我推荐了许多有用的资料和文献,他的指导和建议使我受益匪浅,有了指导老师的辅导和指点,我论文才能够顺利完成。老师的认真负责的工作态度和治学严谨之道使我们这些即将踏入社会的毕业生受益匪浅。

然后要感谢我的同学们,感谢大家对我这次毕业设计的帮助,也感谢大家在大学生活中对我的陪伴,使得我的大学生活过的很快乐。

另外,我还要感谢父母,感谢一直以来对我的支持,让我能够顺利的完成我的学业,没有你们也就没有我的今天,感谢你们无私的付出,未来我一定会报答你们的。

最后,感谢在座的所有参加我论文答辩的老师们,感谢大家的聆听,你们辛苦了。

本文须知

当前文章摘取了完整论文的一部分。该系统配套了完整的讲解视频、源码、毕业论文。同时有非常多的不同类型的课题供大家选择。有需要可点击名片添加领取哦。

Guess you like

Origin blog.csdn.net/qq_42003636/article/details/129637320