Java8 - functional interface and Lambda

Catalogue of series articles 1. Functional interface 1.1 concept of functional interface In an interface, there can only be one abstract method, and there can be other non abstract methods, such as static and default methods. Defining a functional interface is simple: public interface MyFunctioUTF-8...

Posted by zkoneffko on Thu, 23 Sep 2021 15:34:09 +0530

The definition and use of Java annotations and the enhancement of annotations by spring

1, What is annotation? Annotation is an enhancement of code. You can obtain annotation information during code compilation or code running, and then do some targeted things according to this information 2, Define annotation 2.1 syntax The classes and interfaces related to annotations in the jdUTF-8...

Posted by Devil_Banner on Sat, 25 Sep 2021 14:52:47 +0530

java classic interview questions (call the method dynamically through reflection by entering the method name or the value value annotated on the method name)

Problem description Existing in one of the following classes package com.qianfeng.workone.ReflectWork01; import com.qianfeng.workone.ReflectWork01.annotation.Process; public class Calculate { @Process("add to") public void add() { System.out.println("add Method was called"); } public void edit(UTF-8...

Posted by V34 on Sun, 26 Sep 2021 15:55:45 +0530

[note] Spring Cloud Zuul(API gateway service) and spring cloud config (configuration center) of spring cloud

Spring Cloud Zuul Build gateway Create a Spring Boot project and name it API getaway. Add spring cloud starter zuulAdd @ EnableZuulProxy to the main application class (enable API gateway service function with annotation)Configure the basic information of Zuul (application name, port number, etUTF-8...

Posted by webguy262 on Thu, 07 Oct 2021 13:08:01 +0530

feign component of microservices

feign Getting started with Feign service invocation background In the past, it was troublesome to use RestTemplate to call the interface, so with feign, it can be simpler and more convenient. Use RestTemplate to realize REST API call. The code is roughly as follows: @GetMapping("/buy/{id}") pubUTF-8...

Posted by bsprogs on Sat, 09 Oct 2021 11:22:07 +0530

Swagger quick start learning (based on crazy explanation)

Introduction to Swagger Learning objectives: Understand the concept and function of SwaggerMaster the integration of Swagger in the project and automatically generate Api documents About Swagger Front and rear end separation Front end - > front end control layer, view layerBackend - > backend cUTF-8...

Posted by slipster70 on Sun, 10 Oct 2021 17:54:05 +0530

Common objects for case servlet s

Key points review 1. Definition of servlet? Servlet is the abbreviation of Java Servlet, which is called small service program or service connector. The main function of server-side program written in Java is to interactively browse and modify data and generate dynamic Web content. Servlet in tUTF-8...

Posted by dannymc1983 on Wed, 13 Oct 2021 19:43:31 +0530

Use of swagger API documentation tool

Use of swagger API documentation tool 1. Introduction to swagger Many people think that swagger is just an interface document generation framework, but it is not. Swagger is a group of open source tools built around OpenAPI Specification (OAS, also known as OpenAPI Specification in Chinese). ItUTF-8...

Posted by FUNKAM35 on Sat, 16 Oct 2021 13:51:34 +0530

SSM knowledge points + Notes

Special description of parameter value 1. Formal parameter / argument: the parameter passes a value, independent of the name; 2.resultMap simplification: when the hump mapping rule is enabled, it can be mapped automatically, and the resultType can be used directly; 3. If there is only one paraUTF-8...

Posted by jamescalvin on Tue, 19 Oct 2021 10:01:15 +0530

Use spring security to set user jwt token and interface access rights

1. Configure Swagger To facilitate the test, first configure and add a token item in swagger config, and configure token as the request header parameter: @Configuration @EnableSwagger2 public class SwaggerConfig { /** Start swagger */ @Value("true") private boolean enabled; /** * Create API */UTF-8...

Posted by EvanAgee on Tue, 19 Oct 2021 12:09:33 +0530