Design and Implementation of Custom Bus System Based on Java

Source code and database sql file download address : https://download.csdn.net/download/sheziqiong/87783833
Source code and database sql file download address : https://download.csdn.net/download/sheziqiong/87783833

Design and implementation of custom bus systems

  • Thesis title: Design and Implementation of a Custom Bus System Based on Java
  • Summary of content: Customize bus routes according to user needs, and customize reasonable driving routes on the premise of fully meeting user needs. This system is suitable for residential areas with large population density.

1. Project structure

➜  numberone-springboot git:(master) ✗ tree -L 1
.
├── logs                    # 日志存储目录
├── numberone-admin         # 后台:前端静态文件、后端控制层、主配置文件
├── numberone-common        # 工具:自定义注解、全局配置、XSS 过滤、JSON 数据处理等
├── numberone-framework     # 框架:注解实现、数据权限、异步处理、前端控制等
├── numberone-suncustom     # 公交:定制公交模块,子模块,新增模块
├── numberone-system        # 系统:实体类、数据层、业务层等
├── profile                 # 本地图片、头像存储目录
└── sql                     # SQL 数据库导出目录

numberone is a multi-module project, a Java EE background management module, which contains many functions. When writing your own project, adding new modules is helpful to distinguish the structure. The original introduction is appended below:

NumberOne SpringBoot is a Java EE enterprise-level rapid development platform based on classic technology combinations (Spring Boot, Apache Shiro, MyBatis, Thymeleaf, Bootstrap, Hplus), built-in modules such as: department management, role users, menu and button authorization, data permissions, System parameters, log management, notification announcements, etc. Online scheduled task configuration; supports clusters and multiple data sources.

main features

  • Fully responsive layout (supports all mainstream devices such as computers, tablets, and mobile phones)
  • Powerful one-click generation function (including controller, model, view, menu, etc.)
  • Supports multiple data sources, and switching can be realized with simple configuration.
  • Support buttons and data permissions, and can customize department data permissions.
  • Secondary encapsulation of commonly used js plug-ins to make the js code more concise and easier to maintain
  • Perfect XSS prevention and script filtering, completely eliminate XSS attacks
  • Maven multi-project dependencies, modules and plug-ins are sub-projects, as loosely coupled as possible, to facilitate module upgrades, increase or decrease modules.
  • Internationalization support, server and client support
  • A complete logging system can be realized with simple annotations
  • Cache EhCache unified management, support fast switching to Redis cache, cluster Session cache sharing

technical structure

  • system environment

JDK environment: Java EE 1.8

Dependency management: Apache Maven 3.6.1

  • main frame

Spring Framework: SpringBoot 2.2 M2

Security permissions framework: Apache Shiro 1.4

  • persistence layer

Database framework: Apache MyBatis 3.4, Spring Date JPA 2.1.8

Backend validation framework (ORM): Hibernate Validation 6.0

Database monitoring (connection pool): Alibaba Druid 1.1

  • view layer

Front-end development kits: Bootstrap 3.3, Layui 2.4.5

Spring front-end framework: Thymeleaf 3.0

Background main framework: Hplus 4.1

  • development environment

Development OS: Ubuntu 18.04.02 LTS

Development Compiler: IntelliJ IDEA 2019.2

2. Build and deploy

The main body is based on SpringBoot, so it is very simple to build, mainly to modify the configuration file.

  • Configuration file:numberone-springboot/numberone-admin/src/main/resources/application.yml

  • Database configuration:numberone-springboot/numberone-admin/src/main/resources/application-druid.yml

configuration file

At the time of the initial design, I hoped to use JPA to control the database, because I really didn’t want to write configuration files, so I did the same when creating a new module. Each sub-module itself can have an independent configuration file. When learning SpringBoot, I know each Different configuration files have different integration functions in the end, the same coverage, but different integration.

  • JPA configuration
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/numone-springboot?useSSL=false
spring.datasource.username=root
spring.datasource.password=szyink
spring.jpa.properties.hibernate.hbm2ddl.auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
spring.jpa.show-sql=true

Directory structure recommendation

  • Entity class
    • A: com.xxx.domain(jpa project)
    • B: com.xxx.pojo(mybatis project)
  • data access layer
    • A: com.xxx.repository(jpa project)
    • B: com.xxx.mapper(mybatis project)
  • service layer
    • interface:com.xxx.service
    • accomplish:com.xxx.service.impl
  • control layer
    • com.xxx.controller
  • paging file
    • Static files:/src/main/resources/static
    • View template:/src/main/resources/templates
  • Mybatis mapping file
    • /src/main/resources/mapper

3. Run the screenshot

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
Source code and database sql file download address : https://download.csdn.net/download/sheziqiong/87783833
Source code and database sql file download address : https://download.csdn.net/download/sheziqiong/87783833

Guess you like

Origin blog.csdn.net/newlw/article/details/130677442