Using aop to encrypt and decrypt http interface

background Recently, I am writing a small program interface. Because of its high security, I need to encrypt the request parameters and response. If we encrypt and decrypt every method, the code will be too tedious and the workload will increase. Therefore, we will carry out unified encryption and decryption processing. A more traditional way i ...

Posted on Sun, 08 Dec 2019 07:03:59 -0500 by hebisr

Eureka Registry - service discovery

Eureka registry / service discovery framework Eureka is a service discovery framework developed by Netflix. It is a REST based service. It is mainly used to locate the middle tier services running in the AWS domain to achieve the purpose of load balancing and service failover in the middle tier. Spring cloud integrates it into its subproject, ...

Posted on Sun, 08 Dec 2019 04:39:48 -0500 by sirish

Solve the inconsistency of session ID in cross domain access of ajax

According to the protection rules of the browser, the sessionId created by us will not be saved by the browser when cross domain access occurs. In other words, the server will think that it is a new person, not the same person, for each request. In order to solve this problem, here's how to There are ways to solve this cross domain approach.   ...

Posted on Sun, 08 Dec 2019 03:07:35 -0500 by importune

SpringBoot Unified Exception Handling

Sample code in https://github.com/laolunsi/spring-boot-examples 1. Global Unified Exception Handling Configuration Let's start with an interface: @RestController @RequestMapping(value = "") public class IndexAction { @GetMapping(value = "add") public Integer add(Integer a, Integer b) { return a+b; } } Think: What happens i ...

Posted on Sat, 07 Dec 2019 23:19:59 -0500 by sdaniels

Using JPA in SpringBoot

In the last article, we used the JdbcTemplate to access the database. After all, we used the native SQL form. I'm sure that lazy people like me won't consider it.. This record uses JPA to greatly reduce our code volume First, prepare the SQL file DROP TABLE IF EXISTS users; CREATE TABLE users ( id INT ( 11 ) PRIMARY KEY AUTO_INCR ...

Posted on Sat, 07 Dec 2019 19:49:01 -0500 by alwoodman

Using Controller to extract data in elastic search (simple query)

Spring boot's support for elastic search can provide data query directly called in the Controller layer, which can be implemented without any query statement written by you. maven relies on: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter ...

Posted on Sat, 07 Dec 2019 18:32:44 -0500 by corruption

spring cloud microservice distributed Cloud Architecture - Eureka server building and configuration

The first step is to create a normal springboot project The following methods can quickly create a boot project: Visit http://start.spring.io/, fill in the information, download the zip package, and use it directly in your ide workspace. Using idea to generate boot project automatically Using eclipse to create a boot proje ...

Posted on Sat, 07 Dec 2019 15:54:51 -0500 by Daisatske

Spring Boot - Custom Starter package

Encapsulate a Demo of a custom Starter in spring boot, from create a module - > encapsulate Starter - > use. @pdai thinking 1 - create a Demo Project to simulate a DemoModule module to be encapsulated, and the core method is exeModuleMethod 2 - the instance of DemoModule can be directly initialized to Spring container through starter e ...

Posted on Sat, 07 Dec 2019 13:49:28 -0500 by tready29483

beanfactory of containers

1. As we all know, the top-level interface of spring ioc function implementation is BeanFactory. As shown below This one is more comprehensive: And more perverted 2.BeanFactory is the top-level interface, which defines the core interface to be implemented package org.springframework.beans.factory; public interface BeanFactory { /** ...

Posted on Sat, 07 Dec 2019 13:49:28 -0500 by successor

Spring boot integrates Redis by annotation

1. First import the jar package using Maven   <dependency>         <groupId>org.springframework.boot</groupId>         <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <dependency>     <groupId>com.alibaba</groupId>     <artifactId>fastjson</artifactId>      ...

Posted on Sat, 07 Dec 2019 13:14:45 -0500 by danielleuk