Design ideas for internal calls of interfaces between microservices (server side)

Foreword First of all, when it comes to internal calls between interface microservices, the most important thing to consider is how the service provider can dynamically identify which interfaces need to be exposed, without opening the access scope too large to avoid security issues. Secondly, how to ensure that these exposed interfaces can normally accept […]

Customize SpringMVC interceptor to implement internal and external network access control functions

This article briefly introduces how to customize a SpringMVC interceptor and implement specific functions through the interceptor. First, you need to create a custom interceptor class that implements the HandlerInterceptor interface. package cn.edu.sgu.www.mhxysy.interceptor; import cn.edu.sgu.www.mhxysy.feign.FeignService; import cn.edu.sgu.www.mhxysy.property.NetworkProperties; import cn.edu.sgu.www.mhxysy.restful.JsonResult; import cn.edu.sgu.www.mhxysy.restful.ResponseCode; import cn.edu.sgu.www.mhxysy.util.IpUtils; import com.alibaba.fastjson.JSON; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import org.springframework.web.servlet.HandlerInterceptor; […]

Solve java.lang.SecurityException: Permission denied (missing INTERNET permission?)at java.net.Inet6Add

Table of Contents Solve java.lang.SecurityException: Permission denied (missing INTERNET permission?) at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:135) Solution to java.lang.SecurityException: Permission denied (missing INTERNET permission?) at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:135) When developing Android applications, we often encounter various exceptions. One of the common problems is java.lang.SecurityException: Permission denied (missing INTERNET permission?) at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:135). This exception is usually caused by a lack of ??INTERNET?? […]

A complete example of applying the CNN model trained on MNIST to recognize handwritten digit pictures (pictures from the Internet)

1 Think about how to apply the training model How can the MNIST model trained through CNN be applied to recognize pictures of handwritten digits (pictures come from the Internet)? This problem bothered me for 2 days. Many of the codes I found online were to train the model and call the model in a […]

Linux-kylin or ubuntu, configure IP, bind network port, container network isolation, internal and external communication

ip configuration Effective permanently or temporarily If it involves production, the mac address of the network port of each machine is different. For different systems, ubuntu and centos have different modification methods. Application scenario, based on the domestic system kylin, each production machine needs to maintain the same network port name When booting, the kylin […]

Deploy an Elasticsearch 6.8 cluster on 3 CentOS 7.8 servers that are not connected to the Internet

In order to deploy an Elasticsearch 6.8.23 cluster on 3 CentOS 7.8 servers that are not connected to the Internet, and taking into account the configuration of path.data and path.logs, we can follow the following steps To do: 1. Preparation 1.1 Download the RPM package of Elasticsearch 6.8.23 from a machine with network access: https://www.elastic.co/downloads/past-releases/elasticsearch-6-8-23 […]

A brief analysis of the internal workflow of notifyDataSetChanged

First of all, we know that notifyDataSetChanged is a method of Adater. It is mainly used to notify ListView and tell it that the data of Adapter has changed and the display of ListView needs to be updated. Therefore, when the data content of Adapter changes, notifyDataSetChanged() method will be called. Take a look directly […]

[Question Solving] Integer is assigned a constant 1 in auto-boxing, why does == determine true and false (JDK source code, internal buffer)

Table of Contents answer: 1.low and high values in the if statement 2. What is returned in the if block 3.Outside the if statement block Summarize Question code JDK source code related source code The problem comes from the Integer exercise during the lecture The first reaction at that time was false true true There […]

Configure the two gateways to be interconnected through IPSec VPN and perform NAT through the headquarters IPSec gateway to access the Internet.

Specifications Applicable to V200R002C00 and higher versions and all types of AR routers. Network requirements As shown in Figure 1, an enterprise is divided into a headquarters and two branches. Branch 1 and Branch 2 are connected to the Internet through RouterB and RouterC respectively. RouterA is a NAT gateway. Headquarters RouterA and branch RouterB […]

Two ultra-practical SUMO map generation and replacement methods for Internet of Vehicles simulation

Three files are required to run the SUMO emulator ***.net.xml file: build road network, create traffic lights, etc., and generate road files; ***.rou.xml file: generate vehicle file; ***.sumocfg file: combine net.xml and rou.xml files to achieve simulation. SUMO map replacement Road network files in SUMO can be drawn directly using the netedit software, or you […]