Spring Boot environment configuration

Introduction:Spring Boot was started by the Pivotal team in 2013 Developed and released the first version of a new open source lightweight framework in April 2014. It is designed based on Spring 4.0, which not only inherits the original excellent features of the Spring framework, but also further simplifies the entire construction and development process of Spring applications by simplifying configuration. In addition, SpringBoot integrates a large number of frameworks to solve problems such as version conflicts of dependent packages and reference instability. Out-of-the-box use means that during the development process, you add relevant dependency packages to the pom file of the MAVEN project, and then use corresponding annotations to replace cumbersome XML configuration files to manage the life cycle of objects. This feature allows developers to get rid of complex configuration work and dependency management work, and focus more on business logic. Although this feature reduces some flexibility and increases the complexity of BUG location, it reduces the number of decisions developers need to make, reduces a large amount of XML configuration, and can automate code compilation, testing and packaging. .

Spring Boot is a rapid development scaffolding based on the Spring framework. It simplifies the initialization and building process of Spring applications and provides many convenient functions and features, such as automatic configuration, embedded Tomcat, etc., allowing developers to You can focus more on the implementation of business logic

Background of Spring Boot:

Over the years, as Spring has developed rapidly and new features have been added, Spring has become more and more complex.

So Spring Boot came into being. Spring Boot is built on the basis of Spring and follows the principle of “convention over configuration”, avoiding the complicated configuration that must be done when creating a project or framework, helping developers use existing Spring more simply and conveniently with the least amount of work. All functional components in

Screenshot of just entering the Spring Boot project

Use the Spring Initializr template to create a Spring Boot project – ProfileDemo01. After configuration, click the [Next] button

Springboot Structural Analysis

Spring Boot creates packages and classes

Spring Boot Starter: This is the core dependency package of Spring Boot. It includes all basic functions of Spring Boot, such as automatic configuration, startup dependencies, Actuator, etc.

package com.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.core.io.schubfach.DoubleToDecimal;
import lombok.Data;

@Data
@TableName("orders")
public class Order {

    @TableId(type = IdType.AUTO)//Set id to auto-increment and be the primary key
    private Long id;
    private Data inDatetime;//entry time
    private Data outDatetime;//departure time
    private DoubleToDecimal pricel;//payment amount
    private boolean isPayCompleted;//payment status
    private boolean isRequireInvoicing; //Invoicing status
    private ParkingLot parkingLot;//
    private Vehicle vehicle;//

}
package com.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

@Data
@TableName("parking_lot")
public class ParkingLot {
    @TableId(type = IdType.AUTO)//Set id to auto-increment and be the primary key
    private Long id;
    private String name;
    private int volumetric;
    private PricingStandard pricingStandard; //Associated parking lot
}
package com.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.thymeleaf.expression.Dates;

import java.util.Date;

@Data
@TableName("pricing_standard")
public class PricingStandard {
    @TableId(type = IdType.AUTO)//Set id to auto-increment and be the primary key
    private Long id;
    @TableField("hourly_rate")
    private Integer hourlyRate;//Billed by the hour
    @TableField("daily_rate")
    private Integer dailyRate;//Billed by day
    @TableField("exceeding_hours")
    private Integer exceedingHours;//Billed by day for exceeding hours
    @TableField("create_date")
    private Date createDate;

    publicPricingStandard() {
        this.createDate =new Date();
    }
}
package com.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.thymeleaf.expression.Dates;

import java.util.Date;

@Data
@TableName("pricing_standard")
public class PricingStandard {
    @TableId(type = IdType.AUTO)//Set id to auto-increment and be the primary key
    private Long id;
    @TableField("hourly_rate")
    private Integer hourlyRate;//Billed by the hour
    @TableField("daily_rate")
    private Integer dailyRate;//Billed by day
    @TableField("exceeding_hours")
    private Integer exceedingHours;//Billed by day for exceeding hours
    @TableField("create_date")
    private Date createDate;

    publicPricingStandard() {
        this.createDate =new Date();
    }
}
package com.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

@Data
@TableName("vehicle")
public class Vehicle {
    @TableId(type = IdType.AUTO)
    private Long id;
    @TableId("license_plate")
    private String licensePlate;//Vehicle plate number
    private String picUrl;//Vehicle photo storage address
    @TableId("is_active")
    private boolean isActive;//Mark vehicle admission’ stance status
    private ParkingLot parkingLot;//The parking lot where the vehicle is parked
}

The main functional modules of the parking lot management system include system users (administrators, parking users), module management (vehicle information, announcement information, vehicle moving notice, parking space information, parking area, parking space reservation, vehicle entry, vehicle exit), etc. , adopting an object-oriented development model for software development and hardware installation, which can well meet the needs of actual use, and improves the corresponding software construction and program coding work. Mysql is used as the main storage unit of background data. The springboot framework, Java technology, and Ajax technology are used to code and develop the business system, and realize all the functions of this system. This report first analyzes the background, role, and significance of the research, laying the foundation for the rationality of the research work. Analyze the various needs and technical issues of the parking lot management system, prove the necessity and technical feasibility of the system, and then give a basic introduction to the technical software and design ideas that need to be used to design the system, and finally realize the parking lot management System deployment and operation:

Link to Mysql database

springboot framework running code parking fee

Spring Boot has the following features and functions:

1. Automatic configuration: Spring Boot automatically
Configuration reduces the workload of manual configuration.
2. Embedded server: Spring Boot can embed Tomcat, Jetty and other Web
server, simplifying the deployment and startup process.
3. Simplified dependency management: Spring Boot provides a unified set of dependency management
Management mechanism can simplify the introduction and version management of dependencies.
4. Componentization: Spring Boot adopts a modular design and can be customized as needed.
Seek to selectively introduce various functional components, such as database access, security, etc.
5. Powerful development tool support: Spring Boot integrates many development tools
Tools, such as automatic reloading, hot deployment, etc., improve development efficiency.
6. Health checking and monitoring: Spring Boot provides health checking and monitoring functions.
Ability to monitor the running status and performance indicators of applications.
7. Production readiness: Spring Boot provides various features and configuration options,
To ensure the stability and reliability of applications in production environments

Spring Boot Summary

Spring Boot is a Spring-based framework designed to simplify the creation and deployment of Spring applications. It provides a fast and flexible way to build Java applications through automatic configuration and the principle of convention over configuration. Spring Boot can quickly build large-scale Spring projects and simplifies project configuration and dependency management, allowing developers to focus on business development.
Spring Boot features include:
  1. Quick setup: Spring Boot provides a convenient entry experience. By introducing parent dependencies and starter dependencies, you can quickly build Spring-based projects.
  2. Embedded application server: Spring Boot has embedded application servers, such as Tomcat and Jetty, allowing developers to run applications without additional configuration.
  3. Automatic configuration: Spring Boot automatically configures relevant components based on dependencies in the project, reducing the workload of manual configuration.
  4. No code generation: Unlike the traditional Spring framework, Spring Boot has no code generation and no need to configure XML files, simplifying the development process.