Skip to content

Instantly share code, notes, and snippets.

ls -rt | head -$((`ls|wc -l` - 1))
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
View eureka-client.yml
eureka.instance.hostname: ${} # 注册中心的地址以 ip:port 的形式存储,否则会在其他主机上出现 localhost 的地址
moods445 /
Created Apr 2, 2019
spring boot rabbitmq configurations #Java
# RABBIT (RabbitProperties)
spring.rabbitmq.addresses= # Comma-separated list of addresses to which the client should connect. # Duration to wait to obtain a channel if the cache size has been reached. # Number of channels to retain in the cache.
spring.rabbitmq.cache.connection.mode=channel # Connection factory cache mode.
spring.rabbitmq.cache.connection.size= # Number of connections to cache.
spring.rabbitmq.connection-timeout= # Connection timeout. Set it to zero to wait forever.
spring.rabbitmq.dynamic=true # Whether to create an AmqpAdmin bean. # RabbitMQ host. # Acknowledge mode of container.
moods445 / MyClassLoader
Last active Feb 13, 2019
Custom ClassLoader #Java
View MyClassLoader
JarFile jarFile = new JarFile(jarFilePath.toFile());
URLClassLoader jarClassLoader = new URLClassLoader(
new URL[]{jarFilePath.toUri().toURL()},
Class tClass = Class.forName(className, true, classLoader);
moods445 / HttpMethod
Last active Jun 22, 2019
Bean validation #Java
View HttpMethod
package cn.internetware.yancloud.dataretention.schedule.constraints;
import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;