SpringBoot online collaborative office small program development full-stack project actual combat

download: SpringBoot online collaborative office applet development full-stack project actual combat

In the future, online collaborative office will become a normal way of working. This course will adopt the most popular front-end and back-end separation architecture design, using SpringBoot+uniapp technology stack to develop an online collaborative office small program. Let you master the future trend-oriented business + front-end and back-end integrated technology stack, and take you to achieve the comprehensive improvement of the full technology stack.


Technical requirements
1. HTML / CSS basics 2. JS interaction knowledge 3. Basic Vue knowledge 4. JavaWeb related knowledge
Environmental parameters
SpringBoot 2.3, uni-app2.9 Development tools: IDEA, HBuilderX

What is Spring Boot?
Spring Boot is a brand new structure provided by the Pivotal team. Its planning intention is to simplify the initial establishment and development process of the new Spring application. The structure uses a specific method for equipment, so that developers no longer need to define prototype equipment. To understand in my words, Spring Boot is actually not a new structure. It acquiesces in the use of many structures. Just like Maven integrates all Jar packages, Spring Boot integrates all structures.

What are the benefits of using Spring Boot is
actually simple, fast, and convenient! It is usually assumed that we need to establish a Spring Web project intent and time-division requirements.

1) Equipped with web.xml, load Spring and Spring mvc
2) Equipped with database connection, equipped with Spring business
3) Equipped with loading equipment file reading, open comments
4) Equipped log file
... After
equipment is completed, install Tomcat for debugging
.. .
Microservices are very popular now, suppose my project only needs to send an email, suppose my project only produces a credit; I need to toss it again!

But what about Spring Boot?
Very simple, I only need very few equipment to be able to set up a set of Web projects or build a microservice flexibly and conveniently!

How cool is it to use Spring Boot? Use the following picture to express

Quick start has
said so much, my hands are itchy, let me try it out now!

Maven build project

1. Visit http://start.spring.io/
2. Select the build tool Maven Project, Java, Spring Boot version 2.1.3 and some basic project information, as shown in the figure below:

3. Click Generate Project to download the project compression package.
4. After decompression, use Idea to import the project, File -> New -> Model from Existing Source.. -> select the decompressed folder -> OK, select Maven all the way Next, OK done !
5. Assuming that Eclipse is used, Import -> Existing Maven Projects -> Next -> select the unzipped folder -> Finsh, OK done!
Idea to build the project

1. Select File -> New —> Project... pop up the new item intention box
2. Select Spring Initializr, Next will also present the similar equipment interface mentioned above, Idea helped us to integrate
3. After filling in the relevant content, click Next to select Rely on the package and then click Next, and finally confirm that the information is correct and click Finish.

Project structure introduction

springboot2

As shown in the figure above, there are three files in the Spring Boot infrastructure:

l src/main/java program development and main program import

l src/main/resources equipment file

l src/test/java inspection program

In addition, the directory function advocated by spingboot is as follows:

Root package structure: com.example.myproject

Imitation code
com
+- example
+- myproject
+- Application.java

+- domain
+- Customer.java
+- CustomerRepository.java
  +- service
  |  +- CustomerService.java
  |
  +- controller
  |  +- CustomerController.java
  |

Imitation code
1. Application.java is recommended to be placed under the directory, mainly used for some structural equipment

2. The domain directory is mainly used for Entity and data access layer (Repository)

3. The service layer is primarily business code

4. Controller acts as page visit control

Choosing the default equipment can save a lot of equipment, of course, you can also change it according to your favorite

After all, advocate the Application main method, so far a java project has been established!

Guess you like

Origin blog.51cto.com/15086060/2593693