Spring boot development series - experience in developing WebSocket

1, foreword In some project scenarios, WebSocket is a powerful tool, but after all, there are few general application scenarios. While still remembering, write down some experiences in the development process, so as not to forget when it is needed again in a year and a half. I have written a "WebSocket, no polling" before, and talked ...

Posted on Tue, 24 Mar 2020 06:40:05 -0400 by PurpleMonkey

RestFul API unified format return + global exception handling

Background Today, with the prevalence of distributed and microservices, most of the projects adopt the microservice framework, with the front and back end separated. The front-end interacts with the back-end. The front-end requests the URL path according to the agreement, and passes in the relevant parameters. The back-end server receives the r ...

Posted on Mon, 23 Mar 2020 23:48:31 -0400 by AliasZero

SpringBoot Learning Notes-010

4.8. Configuring an embedded Servlet container SpringBoot defaults to Tomcat as the embedded Servlet container: version 9.0.31 Question? 4.8.1. How to customize and modify the configuration of the Servlet container 1. Modify server-related configurations (see parameters) ServerProperties Class; server.port=8081 server.servlet.context-path= /ep ...

Posted on Mon, 23 Mar 2020 13:06:36 -0400 by php_dev_101

Talk about Token renewal processing of OAuth 2.0

Token verification logic // CheckTokenEndpoint.checkToken @RequestMapping(value = "/oauth/check_token") @ResponseBody public Map<String, ?> checkToken(@RequestParam("token") String value) { // Query all the information of the token stored in the tokenStore according to the token OAuth2AccessToken token = resourceServerTokenServi ...

Posted on Mon, 23 Mar 2020 03:07:58 -0400 by adamhhh

springboot integrates mybatis and sets up multiple data sources

Springboot is now more popular than spring because it is simple, fast and convenient. Springboot was originally designed to simplify the configuration of spring by integrating new functionality faster in development, simplifying or reducing related configurations.Springboot is based on convention over configuration.All frameworks are integrated ...

Posted on Sun, 22 Mar 2020 13:09:25 -0400 by BornForCode

Application instances of feign (including applying springCloud projects and not in springCloud)

1. An instance of feign used in a project other than SpringCloud (data exchanged is not an object). Consumer side of service: maven packages that need to be imported (where feign-core represents the package that needs to be imported when feign is used, while feign-jackson is used to exchange data between service consumers and producers often wi ...

Posted on Sun, 22 Mar 2020 12:15:02 -0400 by gotDNS

Spring Data Redis - quick start

Environmental requirements: Redis 2.6 and above, javase 8.0 and above; 1, Introduction to Spring Data Redis Spring data redis is a part of spring. It provides access to redis services through simple configuration in srping applications. It highly encapsulates the underlying development package of reids (Jedis, JRedis, and RJC). RedisTemplate pr ...

Posted on Sat, 21 Mar 2020 13:20:30 -0400 by kmussel

[Java] dynamically modify a property value of annotation through reflection

I saw one last night problem , the main idea is that the landlord wants to dynamically create multiple Spring scheduled tasks. I'm not very familiar with this topic, but according to the topic description and related Spring creation timing task materials, I found that this may involve dynamic modification of annotation attribute values through ...

Posted on Sat, 21 Mar 2020 07:07:33 -0400 by krysco

[Spring Security + OAuth2 + JWT Getting Started to Practice] 24. Custom token configuration

brief introduction Previously acquired tokens were generated based on the Spring Security OAuth2 default configuration. Spring Security allows us to customize token configuration, such as different client_id s corresponding to different tokens, token validity time, token storage policy, etc. Custom token configuration Let authentication ser ...

Posted on Fri, 20 Mar 2020 23:52:18 -0400 by Ang3l0fDeath

Dubbo Source Learning-Service Publishing

I. Ideas for Self-realization Parse Profile netty communication Serialization, Deserialization Service Address Registration to Registration Center 2. How to parse the spring configuration file Typically, information about services is placed in the spring configuration file for dubbo parsing calls.So how do these profiles work? 2.1. De ...

Posted on Fri, 20 Mar 2020 23:26:34 -0400 by nttaylor