SpringBoot+Vue full-stack development actual documents that Ali is learning in advance

Preface

As a lightweight container, Spring has been widely used in JavaEE development, but the configuration of Spring is cumbersome and bloated. When integrating with various third-party frameworks, the amount of code is very large, and the integrated code is mostly repetitive , In order to enable developers to quickly get started with Spring and use Spring framework to quickly build JavaEE projects, Spring Boot came into being.

Spring Boot brings a brand-new automated configuration solution, using Spring Boot can quickly create independent applications based on Spring production. Spring Boot provides default automated configuration solutions for some commonly used third-party libraries, so that developers can run a complete Java EE application with very little Spring configuration. Spring Boot projects can be packaged into war packages using traditional solutions, and then deployed to Tomcat to run. It can also be directly marked as an executable jar package, so that a Spring Boot project can be started through the java-jar command. In general, Spring Boot has the following advantages:

  • ·Provide a quick Spring project construction channel.
  • ·Out of the box, you can run a JavaEE project with very little Spring configuration.
  • ·Provides a production-level service monitoring program.
  • Embedded server can be deployed quickly.
  • A series of non-functional general configurations are provided.
  • Pure Java configuration, no code generation, and no need for XML configuration.

Spring Boot is a "young" project, which is developing very rapidly, especially after Spring Boot 2.0, many APIs have undergone major changes. The writing of this article is based on the latest stable version 2.0.4, so it requires Java 8 or 9 and Spring Framework 5.0.8.RELEASE or higher. At the same time, the version of the build tool must be Maven 3.2+ or Gradle 4.

The traditional JavaEE development efficiency is low, the configuration is bloated, and the debugging is inconvenient, which seriously restricts the productivity of programmers. Spring Boot is committed to simplifying development configuration and providing a series of non-business functions for enterprise-level development;

On the other hand, Vue uses a data-driven view to save programmers from tedious DOM operations. With Spring Boot+Vue, large-scale SPA applications can be quickly developed.

Alibaba's internal advanced learning SpringBoot+Vue full-stack development actual documentation

 

This article is dedicated to let readers quickly master the basic technology stack of full-stack development, and be able to quickly and independently develop SPA applications.

I hope you can read this article carefully, understand the essence of it, and be able to absorb it into your work! !

table of Contents

Alibaba's internal advanced learning SpringBoot+Vue full-stack development actual documentation

 

main content

Chapter 1 Introduction to Spring Boot, this chapter mainly introduces readers to the basic creation process of a simple Spring Boot project, so that readers can feel the charm of Spring Boot. When a Spring Boot project is created successfully, with almost zero configuration, developers can directly use the functions in Spring and Spring MVC. Chapter 2 will introduce the basic configuration of Spring Boot to readers in detail.

Alibaba's internal advanced learning SpringBoot+Vue full-stack development actual documentation

 

Chapter 2 Spring Boot Basic Configuration. This chapter mainly introduces the common basic configuration of Spring Boot to readers, including various ways of dependency management, such as entry class annotations, banner customization, Web container configuration, and Properties configuration and YAML configuration. Configuration will be the basis for the following chapters. Chapter 3 will introduce readers to using Spring Boot to integrate the view layer technology.

Alibaba's internal advanced learning SpringBoot+Vue full-stack development actual documentation

 

Chapter 3 Spring Boot integrated view layer technology, this chapter introduces the Spring Boot integrated view layer technology to readers, choosing two representative examples: Thymeleaf and FreeMarker. When developers use other template technologies, the integration method is basically the same as Thymeleaf and FreeMarker. If the developer uses the currently popular front-end and back-end separation technology, then there is no need to integrate the view layer technology during the development process, and the back-end can directly provide interfaces. Chapter 4 will introduce readers to other details of Spring Boot integrated Web development.

Alibaba's internal advanced learning SpringBoot+Vue full-stack development actual documentation

 

Chapter 4 Spring Boot integrates Web development. This chapter introduces readers to some common and useful configurations when Spring Boot integrates Web development. Among these configurations, most of them are the functions of Spring MVC, but automated configuration is done in Spring Boot, and a few are functions provided by Spring Boot itself, such as CommandLineRunner. Chapter 5 will introduce the reader to Spring Boot integrated persistence layer technology.

Alibaba's internal advanced learning SpringBoot+Vue full-stack development actual documentation

 

Chapter 5 Spring Boot integrated persistence layer technology. This chapter mainly shares Spring Boot integrated persistence layer technology with readers, including JdbcTemplate, MyBatis and SpringData JPA. Among them, JdbcTemplate is not widely used; MyBatis is more flexible, which is convenient for developers to optimize SQL; Spring Data JPA is easy to use, especially to quickly implement a RESTful style application (will be introduced to readers in Chapter 7).

Alibaba's internal advanced learning SpringBoot+Vue full-stack development actual documentation

 

Chapter 6 Spring Boot integrates NoSQL. This chapter mainly introduces the reader to Spring Boot's integration of NoSQL database and Redis to realize Session sharing. For NoSQL databases, two more common ones are introduced: MongoDB and Redis. MongoDB can even completely replace relational databases in some scenarios. Redis is more often used as a cache server (Chapter 9 of this book will introduce Redis caching in detail). Developers can choose the appropriate NoSQL according to the specific situation.

Alibaba's internal advanced learning SpringBoot+Vue full-stack development actual documentation

 

Chapter 7 Building RESTful Services. This chapter introduces readers to Spring Boot building RESTful services. Combining Spring Data Rest, Spring Data JPA and Spring Data MongoDB, Spring Boot can quickly build a basic RESTful service, and developers can combine specific conditions. Choose relational database or non-relational database as data support. In some projects with conventional functions, these features of Spring Boot can help developers save many complicated and bloated configurations.

Alibaba's internal advanced learning SpringBoot+Vue full-stack development actual documentation

 

Chapter 8 Developer Tools and Unit Testing. This chapter introduces readers to the developer tools and unit testing in Spring Boot. One of the core functions of the developer tools is hot deployment. Combined with LiveReload, the developer’s waiting time for compilation can be greatly shortened. Effectively improve development efficiency; unit testing is in the same line as Spring unit testing, but it adds many functions and simplifies the test code at the same time, enabling developers to greatly save test coding time. This chapter only introduces some commonly used functions for unit testing. If readers want to know the complete unit testing functions, they can refer to the unit testing section of Spring Boot official documentation.

Alibaba's internal advanced learning SpringBoot+Vue full-stack development actual documentation

 

Chapter 9 Spring Boot Caching. This chapter introduces two common caching technologies Ehcache and Redis to readers. Redis is divided into stand-alone caching and cluster caching. Ehcache is simple to deploy, has a low threshold of use, and is easy to operate, but has fewer functions and weak scalability; Redis requires a separate deployment of servers. The stand-alone version of Redis cache is basically available out of the box, although the cluster version of Redis cache The configuration is cumbersome, but it has good scalability and security. Developers can choose different caching implementation strategies according to actual conditions during development.

Alibaba's internal advanced learning SpringBoot+Vue full-stack development actual documentation

 

Chapter 10 Spring Boot Security Management. This chapter mainly introduces the reader to Spring Security and Shiro's use in Spring Boot. For Spring Security, there are Session authentication based on traditional authentication methods, and authentication using OAuth protocol. Generally speaking, in the traditional Web architecture, it is convenient and fast to use Session authentication. However, it is more convenient to use OAuth authentication if combined with microservices, front-end and back-end separation architecture. Which one to use depends on the actual situation. Choice. For Shiro, although its functions are not as powerful as Spring Security, it is simple and easy to use, and it is also competent for most small and medium-sized projects. Of course, in the SpringBoot project, the integration of Spring Security is obviously easier, so Spring Security can be the first choice. If the development team is not familiar with Spring Security but familiar with the use of Shiro, of course, Shiro can also be used, depending on the specific situation.

Alibaba's internal advanced learning SpringBoot+Vue full-stack development actual documentation

 

Chapter 11 Spring Boot integrates WebSocket. This chapter mainly introduces the reader to Spring Boot integrates WebSocket. On the whole, it is very convenient to use WebSocket after Spring Boot automatic configuration. Configure the message interface through @MessageMapping annotations, and forward messages through @SendTo or SimpMessagingTemplate. Through a few simple lines of configuration, point-to-point and point-to-face message sending can be realized. In the enterprise information management system, WebSocket is generally used for functions such as instant messaging and announcements.

Alibaba's internal advanced learning SpringBoot+Vue full-stack development actual documentation

 

Chapter 12 Message Service. This chapter introduces the reader to Spring Boot’s support for message service. Traditional JMS and AMQP have their own merits. JMS unifies message middleware from the API level. AMQP unifies the message at the protocol level. JMS does not support cross Platform, and AMQP naturally has cross-platform functions. AMQP supports a richer message model. In addition to ActiveMQ and RabbitMQ introduced in this chapter, Spring Boot can also easily integrate Kafka, Artemis, etc., and developers can choose the appropriate message middleware according to the actual situation.

Alibaba's internal advanced learning SpringBoot+Vue full-stack development actual documentation

 

Chapter 13 Enterprise Development. This chapter introduces readers to some commonly used functions in enterprise development, such as email sending, timed tasks, batch processing, Swagger 2 and data verification. These functions have a very wide range of usage scenarios, such as user registration, Password modification, regular backup, interface documentation, etc., except for Swagger2, the other 4 functions provide related Starter in Spring Boot, which simplifies the steps for developers to use and improves development efficiency.

Alibaba's internal advanced learning SpringBoot+Vue full-stack development actual documentation

 

Chapter 14 Application Monitoring. This chapter introduces readers to common application monitoring in Spring Boot projects. It also introduces the configuration of endpoints and the visualization of monitoring data. This set of application monitoring solutions provided by Spring Boot is very powerful, and is used in regular projects. With a little modification, it can be directly used in the production environment. Email alarms can enable the operation and maintenance engineer to obtain the running information of the application in time, especially when the application is offline, to receive notification in time to solve the problem as soon as possible and avoid losses.

Alibaba's internal advanced learning SpringBoot+Vue full-stack development actual documentation

 

Chapter 15 Project Construction and Deployment. This chapter mainly introduces the different packaging methods of Spring Boot projects to readers. Developers can use traditional WAR package deployment, or use Spring Boot official JAR package deployment. There are two deployment methods. The advantages and disadvantages require the developer to choose the appropriate deployment method according to the actual situation.

Alibaba's internal advanced learning SpringBoot+Vue full-stack development actual documentation

 

Chapter 16 The actual combat of the micro-personnel project. This chapter introduces the reader to a micro-personnel project, mainly from the login module, dynamic loading user menu, employee profile module, mail sending module, Excel import and export module, online chat module, and compilation and packaging. Introduction. Due to the huge amount of code in the original project, this chapter mainly selects some key steps to introduce. Readers of the complete code can download it on GitHub. . . .

Alibaba's internal advanced learning SpringBoot+Vue full-stack development actual documentation

 

This [springboot+Vue full-stack development combat] has a total of 343 pages, friends who need the full version, can like this article, follow the editor, and private message editor [Technology] to get it! !

I hope this article can help everyone's study. Come on, study hard! !

Guess you like

Origin blog.csdn.net/m0_46995061/article/details/108732788