The ninth chapter Spring Cloud Feign declarative call service

In the Spring Cloud Netflix stack, each microservice exposes its own services in the form of HTTP interface, so HTTP client must be used when calling remote services. We can use the native URLConnection of JDK, HttpClient of Apache and asynchronous HTTP of Netty Client, Spring's RestTemplate. But the most convenient and elegant thing to use i ...

Posted on Thu, 30 Apr 2020 22:26:04 -0700 by adksga

springboot uses thmeleaf as a template

jsp obviously can't keep up with the development of the times. Is freemarker enough? Try thymeleaf instead. The official recommendation of springboot is freemarker and thymeleaf. Compared with freemarker, thymeleaf is more powerful. It can dynamically replace the static content in the tag, so that the front end can write the page at ease, and ...

Posted on Thu, 30 Apr 2020 21:10:38 -0700 by swissmissflash

Database access of Spring Boot

1, Background Spring boot is a service development framework that integrates service publishing, database management and log management. It is also an all-around helper for microservice development. This chapter describes how to use spring boot to access MySQL database. 2, Build basic environment 1. Install Maven (a lot of guidance docume ...

Posted on Thu, 30 Apr 2020 20:09:29 -0700 by johnh

gateway nacos sentinel

introduce Enterprise level microservice architecture( Source address )Gateway is one of the most important components spring cloud gateway responsive gateway, dynamic gateway based on nacos, dynamic current limiting based on sentinel, data persistence based on nacos Software architecture Version No.: the version no. of gateway, naco ...

Posted on Thu, 30 Apr 2020 02:28:52 -0700 by westonlea7

Implementing websocket client instance by integrating okhttp with spin boot

There are many websocket server implementations on the Internet. The popular one is the spring boot starter websocket of spring boot itself. As for the client, the current popular one is the Java websocket framework. Here is an example of the okhttp framework: 1. Introduction of okhttp: <dependency> <groupId>com.squ ...

Posted on Wed, 29 Apr 2020 21:59:02 -0700 by jcubie

Spring Boot Aspect Aop thought

Spring Boot Aop Scope of Aspect Comment writing of interception rules Writing configuration file Aopconfig The compilation of add operation of comment interception Operation writing of add intercepted by method The writing of logAspect facet Writing of Main Operation results Scope of Aspect In o ...

Posted on Wed, 29 Apr 2020 21:17:16 -0700 by qazwsx

Stream message driven of Spring Cloud series

In the actual development process, message oriented middleware is often used to communicate between services. Message oriented middleware solves the problems of application decoupling, asynchronous processing, flow cutting, etc., and realizes high performance, high availability, scalability and final consistency architecture. The internal imple ...

Posted on Wed, 29 Apr 2020 20:03:23 -0700 by schajee

factory of JAVA design pattern

Any method or class that can generate an object can be called a factory. The single example is the so-called static factory. Why do we need factories when we have new in jdk? a. flexible control of production process b. decorate the object, or give access to the object, or add some log information in the object production process, or add some a ...

Posted on Wed, 29 Apr 2020 10:12:43 -0700 by mingo

Java code farm must master the correct way to delete List elements in a circular way!

Let's first look at the following examples of deleting list elements public static void main(String\[\] args) {     List<String> list = new ArrayList<>(Arrays.asList("a1", "ab2", "a3", "ab4", "a5", "ab6", "a7", "ab8", "a9"));     /**      * Report errors      * java.util.ConcurrentModificationException      */     for (String ...

Posted on Wed, 29 Apr 2020 08:02:44 -0700 by nodehopper

Recommend an IDEA code generator, double the efficiency of code writing!

Easycode is a plug-in of idea, which can generate entity,controller,service,dao,mapper directly to the data table. It is simple and powerful without any coding. 1. Installation (EasyCode) My words here are already loaded. I suggest you install a plug-in called Lombok.   Lombok It can automatically generate constructor, getter/setter, equals, h ...

Posted on Tue, 28 Apr 2020 21:35:50 -0700 by jwwceo