Spring Boot integrates Redis
Spring Boot integrates Redis
spring boot provides the spring data Redis library to integrate Redis operations, and realizes the integration with Redis through simple configuration information.
PS: individuals are still used to using Jedis to operate Redis for Java clients
Don't talk too much, just code. : -)
Maven dependence
<dependency> ...
Added by CaptainStarbuck on Tue, 03 Dec 2019 14:55:32 +0200
A taste of spring cloud - EurekServer highly available
Previously, we implemented service registration and discovery, and implemented the interface call in load balancing. However, our Eureka server is a single point. Although EurekaClient will connect to EurekaServer regularly to obtain the information in the registry and cache it to the local. If eurekacerver is unavailable, Eure ...
Added by psytae on Tue, 03 Dec 2019 08:31:52 +0200
Spring cloud Zul integrates spring config and eureka to realize dynamic routing
1. Add dependent package
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
...
Added by nakins on Mon, 02 Dec 2019 00:11:38 +0200
spring boot2 using log4j2
spring boot uses logback by default. I've seen many places saying that logback consumes more performance than log4j. I haven't tried it, but I still use log4j more personally.
Look at pom dependency first
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter ...
Added by mitchell on Sun, 01 Dec 2019 23:00:56 +0200
spring cloud feign file upload and file download
File upload reference: http://blog.didispace.com/spring-cloud-starter-dalston-2-4/
File download reference: https://blog.csdn.net/aaronsimon/article/details/82710979
My spring boot and spring cloud versions are:
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artif ...
Added by zilem on Sun, 01 Dec 2019 05:50:26 +0200
Java export excel file
demand
Export online / offline user information of each xmpp machine room to Excel table (timed task + web button), and provide download button on Web page for download.
Effect preview
Export file effects
Click download pop-up effect
Code results overview ...
Added by screamer141 on Sat, 30 Nov 2019 21:51:21 +0200
Spring annotation driven development
1 component registration
1.1 @ configuration & @ Bean register Bean
1.1.1 traditional xml
Person.java
package com.xuweiwei.spring.model;
/**
* @describe:
* @author: Don't worry about the past, only laugh for the rest of my life.
* @version: 1.0
*/
public class Person {
private String name;
private Integer age;
...
Added by Illusion on Sat, 30 Nov 2019 12:42:59 +0200
Solving the problem of implicit parameter loss caused by dubbo multiple calls
In the process of using dubbo, if some general parameters are explicitly passed in the interface parameters, it will be inconvenient to use them.
For example, if the user information stored in the frequently used session is passed in the parameter, it will be coupled to the business logic. In this case, implicit parameter passi ...
Added by lilsim89 on Sat, 30 Nov 2019 06:45:37 +0200
spring boot and mybatis
Simplified configuration and content sublimation of spring boot and spring mvc.
How to integrate mybatis in spring boot?
Part 1: maven dependency (you can check it when creating the spring boot project)
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId&g ...
Added by harvillo on Thu, 28 Nov 2019 17:55:23 +0200
[SpringBoot] Add Filter to SpringBoot
Because springboot is based on servlet 3.0+, the embedded tomcat container cannot configure Filter in web.xml as before. This article is based on springboot 1.5.6
First
@WebFilter(filterName = "myFilter",urlPatterns = "/*")
public class MyFilter implements Filter {
@Override
public void init(FilterConfig filterConfig) throws ...
Added by mblack0508 on Thu, 28 Nov 2019 05:50:07 +0200