Handwritten MQ framework - server implementation
First, set sail
Based on the principle of from nothing to have, from having to being excellent, we plan to realize the function through web first, and then optimize it to socket.
1. Technology selection
The web framework uses the gmvc framework written before( Handwritten MVC framework (I) - start again )Message storage adopts the way of existi ...
Posted by seddonym on Sun, 24 Nov 2019 01:46:44 -0800
Operation principle of MyBatis analysis
Provide an interface
package com.ming.MyBatis;
import com.ming.MyBatis.POJO.Role;
import com.ming.MyBatis.POJO.Student;
import com.ming.MyBatis.POJO.StudentCard;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
public interface RoleMapper {
/**
* @param id
* @return
*/
public Rol ...
Posted by geoffs on Sat, 23 Nov 2019 10:08:24 -0800
Spring Cloud Stream of spring cloud: message driven
Spring Cloud Stream is a framework for building message driven microservices. Based on Spring Boot, the framework integrates spring integration to connect message broker middleware (RabbitMQ, Kafka, etc.), provides personalized automatic configuration implementation, and introduces three core concepts: publish subscribe, consumption group and p ...
Posted by courtewing on Sat, 23 Nov 2019 09:56:15 -0800
4. Service registration & service provider
Xiaobian public address: java paradise
Source codehttps://gitee.com/hjj520/spring-cloud-2.x
1. What is a service provider
Service Provider: refers to the callee of the service (i.e. the service that provides services for other services); Service Provider, as an Eureka Client, performs service registration, renewal and offline op ...
Posted by shahryar on Thu, 21 Nov 2019 13:46:22 -0800
Spring boot integrates the Topic of activeMQ. If you don't understand it, you have to understand it
Preface
Today, we share with you springboot's integration of activeMq's topic (Theme) - Publish / subscribe mode, similar to the WeChat public number. We can receive messages when we are concerned about the public. Topic needs consumers to subscribe before they can receive messages. If there is no consumer subscription, the message generated b ...
Posted by mashnote on Thu, 21 Nov 2019 13:02:43 -0800
Get the real ip address of the client in the background
In JSP, the method to get the IP address of the client is: request.getRemoteAddr(), which is effective in most cases. However, after passing Apache, Squid, nginx and other reverse proxy software, the real IP address of the client cannot be obtained. After the proxy, because the middle layer is added between the client and the s ...
Posted by azylka on Wed, 20 Nov 2019 10:24:20 -0800
Zuul of spring cloud: service gateway
The use of Zuul in Web projects is shown above< Using Zuul in SpringBoot >, the following example is Zuul's use in Spring Cloud.
Development tool: IntelliJ idea February 3, 2019
I. server side
1. Create project
Create a new spring boot project named "zuul Eureka server" in IDEA, select 2.1.10 for spring boot version, and che ...
Posted by D_tunisia on Wed, 20 Nov 2019 06:58:16 -0800
Eclipse integrated hadoop plug-in development environment
First, set up the hadoop environment under win10, hadoop can runExtract the installation package and source package of Hadoop 2.7.7, create an empty directory after decompression, and copy all the jar packages under the unpacked source package and other packages except kms directory package under share/hadoop under the installation package to ...
Posted by ThunderVike on Tue, 19 Nov 2019 13:38:13 -0800
shiro learning (IV. shiro integrates spring+springmvc)
Dependency: Spring context, spring MVC, Shiro core, Shiro spring, Shiro Web
To be honest: web.xml,spring,springmvc configuration files are very difficult
General effect
Code structure (built with web skeleton)
pom.xml
<dependencies>
<dependency>
<groupId>junit</groupId>
<a ...
Posted by php1999 on Tue, 19 Nov 2019 10:12:33 -0800
Common encryption methods in java
First, import the jar package, commons-codec.jar. You can use maven or go to the maven official website to download the jar
https://mvnrepository.com/artifact/commons-codec/commons-codec/1.12
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version ...
Posted by candy2126 on Tue, 19 Nov 2019 09:54:28 -0800