(40) spring cloud gateway integration of java Spring Cloud+Spring boot+mybatis enterprise rapid development architecture Eureka routing and forwarding

In this section, we first create a Gateway project, then implement the simplest forwarding function and integrate Eureka routing. Recommended source code of Honghu distributed Cloud Architecture Create Gateway project Create a Maven project of Spring Boot and increase the dependency of Spring Cloud Gateway. The code is as follows. <parent& ...

Posted by nick314 on Sat, 25 Sep 2021 18:34:28 -0700

Mybatis integrated spring of mybatis learning 12 (Continued)

1. Will Mybatis reverse engineering of mybatis learning 11 Copy the com.pp.maper and com.pp.pojo files generated in to spring_ Under the src/main/java file of mybatis 2. Spring_ The mapper point in the applicationContext.xml file in mybatis is changed to com.pp.mapper point to the mapper abstract class under the java file <?xml version="1. ...

Posted by GreyBoy on Sat, 25 Sep 2021 16:54:50 -0700

SpringBoot AutoConfiguration Principle

Official SpringBoot Documentation There are a lot of configurations, and we can't remember them all 1. Find Configuration Directory 1. Enter the Startup Class at @SpringBootApplication 2. Enter @EnableAutoConfiguration under this comment 3. AutoConfigurationImportSelector class imported into @Import({AutoConfigurationImportSelector.class}) ...

Posted by kylebud on Sat, 25 Sep 2021 09:11:20 -0700

Wechat public platform development - verify that the message does come from the wechat server

1. Preface In the previous article, we have successfully configured and enabled the server information. Wechat officials have confirmed that our server is legal. However, there is another problem, that is, how can we confirm that the messages we receive are legitimate, that is, how can we confirm that the messages we receive are sent by w ...

Posted by Dat on Sat, 25 Sep 2021 04:01:06 -0700

Spring MVC exception handling mechanism,

First, exception handling belongs to the spring MVC module, not the spring core. Having this awareness can help us better understand the spring framework. There are two spring MVC unified exception handling mechanisms. The first is to implement the HandlerExceptionResolver interface. The second is to add @ ControllerAdvice annotation on the exc ...

Posted by phencesgirl on Fri, 24 Sep 2021 07:01:12 -0700

Iv-08 practice of uploading micro service files

Project introduction Business description File upload based on Spring Cloud Alibaba solution Initial architecture design The front end and back end are separated, and the service design is based on the spring cloud alibaba solution Initial architecture design, subsequent addition of Gateway project and authentication project Project crea ...

Posted by alexz on Fri, 24 Sep 2021 05:03:29 -0700

(35) spring cloud of java Spring Cloud+Spring boot+mybatis enterprise rapid development architecture - using Zuul to realize fault tolerance fallback function

Zuul's main function is forwarding. In the forwarding process, we can't guarantee that the forwarded service is available. At this time, fault tolerance mechanism and fallback mechanism are needed. Recommended distributed architecture source code  fault tolerance Fault tolerance simply means that when a service is unavailable, it can switch t ...

Posted by jbradley04 on Fri, 24 Sep 2021 03:16:15 -0700

Springboot integrates ElasticSearch 7.14.1. What is ElasticsearchRestTemplate?

Start with a case pom <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> ...

Posted by ariliquin on Fri, 24 Sep 2021 00:49:01 -0700

[Spring Boot] Spring Boot Listener | Servlet listener

This page will introduce an example of the Spring Boot listener. We can register Servlet listeners in Spring Boot using ServletListenerRegistrationBean or @ Component or @ ServletComponentScan. The ServletListenerRegistrationBean class registers the Servlet listener as a Spring Bean. @The ServletComponentScan annotation scans servlet lis ...

Posted by The Midnighter on Fri, 24 Sep 2021 00:44:56 -0700

Spring Boot Note 6 - SMS verification code login for user authentication and authorization

In the previous article, spring security, oauth2 and JWT were used to realize the most commonly used account and password login function. However, there are at least two login methods in the current external online system, and the most commonly used is the SMS verification code. This method has many advantages, such as naturally knowing the use ...

Posted by kingsol on Thu, 23 Sep 2021 07:28:52 -0700