书写工具类实现手动获取容器中的bean
摘要:import java.lang.reflect.Field; import java.util.Map; import org.springframework.beans.BeansException; import org.springframework.beans.factory.suppor
阅读全文
nginx
摘要:nginx 1.nginx基本概念 (1)nginx是什么,做什么事情。 Nginx (engine x) 是一个高性能的HTTP和反向代理web服务器 [13] ,同时也提供了IMAP/POP3/SMTP服务。Nginx是由伊戈尔·赛索耶夫为俄罗斯访问量第二的Rambler.ru站点(俄文:Р
阅读全文
设计模式之策略模式
摘要:使用spring书写策略模式 写一个接口 public interface AccRuleFieldConvertProcessor { Object execute(); } 写三个实现类 一、 @Service(AccRuleField.WAY_CONST) public class AccRu
阅读全文
自定义注解及使用
摘要:自定义注解及使用 定义一个自定义注解 import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import
阅读全文
java操作http请求的三种方式
摘要:java操作http请求的三种方式 一、HttpClient 步骤: 1.获取一个Http客户端 CloseableHttpClient httpClient=HttpClients.createDefault(); 2.创建一个请求 HttpGet httpGet = new HttpGet("h
阅读全文