Cloud E essays - back end_ piece1

1, Project introduction

This project is an online office system for small and medium-sized enterprises. CloudE online office system is a system used to manage daily office affairs.

Specific contents: Daily various process approval, news, notice, announcement, document information, finance, personnel, expenses, assets, administration, project, mobile office, etc.
Function: it is convenient for management through software. Simpler, more flat, efficient and standardized, and improve the overall management and operation level.

In terms of technology, the project uses the current mainstream front-end and back-end separation development mode, and uses the community active and mainstream open source framework Spring Boot to build the back-end, in order to realize the CloudE online office system. Including position management and title management. Department management, employee management, salary management, online chat and other technical modules. The project will also use the industry's mainstream third-party components to expand the skill pool.

Main modules and technical points of the project:

2, Project construction

1. Create parent project

  • pox. Delete part of the configuration from XML, as shown in the figure:
    1. dependencies section
    2. build part
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi=""
        <relativePath/> <!-- lookup parent from repository -->
    <description>Demo project for Spring Boot</description>

  • Directory structure except POM XML, delete other files

2. Create sub project - > cloud_ e_ server

2.1 new project

Right click the parent project - > New - > module

Parent project POM Automatic update insert under XML file


cloud_e_server sub project POM xml

2.2 adding dependencies

Add the required dependencies and temporarily delete the build part of the configuration file

  1. web dependency
  2. lombok dependency
  3. mysql dependency
  4. Mybatis plus dependency
  5. swagger2 dependency
  6. Swagger third party ui dependency
  7. security dependency
  8. JWT dependency
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="" xmlns:xsi=""


    <!-- FIXME change it to the project's website -->


        <!--web rely on-->
        <!--lombok rely on-->
        <!--mysql rely on-->
        <!--mybatis-plus rely on-->
        <!-- swagger2 rely on -->
        <!-- Swagger Third party ui rely on -->
        <!--security rely on-->
        <!--JWT rely on-->


2.3 add profile

resources -> new -> file -> application.yml

# port
  port: 8081

# data source
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://localhost:3306/db_cloud_e?useUnicode=true&characterEncoding=UTF-
    username: root
    password: root
      # Connection pool name
      pool-name: DateHikariCP
      # Minimum number of free connections
      minimum-idle: 5
      # The maximum idle connection lifetime is 600000 (10 minutes) by default
      idle-timeout: 180000
      # The maximum number of connections is 10 by default
      maximum-pool-size: 10
      # Connections returned from the connection pool are automatically submitted
      auto-commit: true
      # Connection maximum lifetime 0 means permanent default 1800000 (30 minutes)
      max-lifetime: 1800000
      # The default connection timeout is 30000 (30 seconds)
      connection-timeout: 30000
      # Test whether the connection is available query statement
      connection-test-query: SELECT 1

# Mybatis plus configuration
  #  Configure Mapper mapping file
  mapper-locations: classpath:/mappers/*Mapper.xml
  #  Configure mybatis data return type alias (default alias is class name)
  type-aliases-package: com.chuci.server.model
    #    Automatic hump naming
    map-underscore-to-camel-case: true

# SQL printing (package of method interface, not Mapper.xml)

    com.chuci.server.dao: debug

# jwt configuration
  # JWT stored request header
  tokenHeader: Authorization
  # Key used for JWT encryption and decryption
  secret: cloude-secret
  # Overdue time of JWT (60 * 60 * 24)
  expiration: 604800
  # Get the start in the JWT load
  tokenHead: Bearer

2.4 create a new startup class cloudeserverapplication java

Package name: com chuci. server
Startup class: cloudeserverapplication java

package com.chuci.server;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

 * @Auther chuci
 * @Data 2021-12-22 21:21
 * @Description:
public class CloudEServerApplication {
    public static void main(String[] args) {, args);

2.5 Cloud_e_server full directory

This concludes this section~~~

Next section:

this system column with finish whole remember record since Oneself term order through calendar This series is a complete record of your project experience This series is a complete record of your project experience

Keywords: Back-end

Added by Revlet on Wed, 12 Jan 2022 12:03:07 +0200