❤ Micro service development Swagger (recommended Collection)
Swagger
1. The role and concept of Swagger
Official address: https://swagger.io/
Swagger is a standardized and complete framework for generating, describing, invoking and visualizing RESTful Web services and integrating swagger to automatically generate API documents.
Swagger's goal is to define a standard and language independent int ...
Posted by jeremyphphaven on Sat, 09 Oct 2021 18:38:57 -0700
Eliminate duplicate code with annotation + reflection
1.1 case scenario
Assuming that the bank provides some API interfaces, the serialization of parameters is a little special. Instead of using JSON, we need to put the parameters together in turn to form a large string:
1) According to the order of API documents provided by the bank, all parameters form fixed length data and are spliced ...
Posted by bobvaz on Thu, 07 Oct 2021 13:26:35 -0700
Swagger study notes
About Swagger
Front and rear end separation
Front end: front end control layer, view layerBack end: back end control layer, service layer and data access layerThe front and back ends interact through ApiThe front and rear ends are relatively independent and loosely coupled
Problems arising
During front-end and back-end integration, the fron ...
Posted by chetanrakesh on Mon, 04 Oct 2021 14:39:25 -0700
Bi set up a sharp tool to teach you to build a standardized spring boot project from scratch [5] - user identity verification
Continued "Bi set up a sharp tool to teach you to build a standardized spring boot project from zero [4] - parameter verification"
The problem of user authentication is a cliche.
After a user logs in, many interfaces need to do user information verification. First, let the server know who the user is, and second, for data security r ...
Posted by gtibok on Sat, 02 Oct 2021 15:18:12 -0700
Three or four examples of Java reflection
Annotation provides a secure annotation like mechanism to associate any information or metadata with program elements (classes, methods, member variables, etc.).
Some predefined annotations in JDK
@Override: check whether the method marked by the annotation inherits from the parent class (Interface)
@Deprecated: the method marked by the ...
Posted by flaquito on Thu, 30 Sep 2021 12:49:23 -0700
The spring security permission annotation of SpringBoot performs permission authentication in multiple ways
preface #
Spring Security supports method level permission control. In this mechanism, we can add permission annotations to any method at any layer. The annotated methods will be automatically protected by Spring Security and only allow specific users to access, so as to achieve the purpose of permission control. Of course, if the existing per ...
Posted by xeq on Tue, 28 Sep 2021 14:35:07 -0700
Nacos service governance
Introduction to service governance
Let's think about a problem first
Through the operations in the previous chapter, we can realize the invocation between microservices. However, we hard code the network address (ip, port) of the service provider into the code, which has many problems:
Once the service provider address changes, you need ...
Posted by aspekt9 on Fri, 24 Sep 2021 02:30:13 -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
Retrofit Source Parsing
How to implement interface calls within Retrofit
We all know Retrofit is by defining an interface, taking an instance of the interface, and calling the corresponding method. We start with the process to see how the source code works. 1. First get a customized service instance by retrofit.create method, source code above:
Here you can see ...
Posted by Kilo on Wed, 22 Sep 2021 10:42:07 -0700
The learning springboot project of elasticsearch version 6.6. X integrates the advanced client elasticsearch rest high level client
Official website learning address
https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.6/java-rest-high.html
Construction project
Create a spring boot maven project Import dependency
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-res ...
Posted by bakigkgz on Tue, 21 Sep 2021 23:09:37 -0700