摘要:使用场景 可以基于标准的Java REST API——JAX-RS 2.0(Java API for RESTful Web Services的简写), 也就是REST的api和注解,为dubbo提供调用支持。 Service示例 在Dubbo使用Rest时,Service接口,作用类似于Sprin
阅读全文
摘要:SpringBoot: SpringBoot开发项目非常方便,无需配置,开箱即用。可以用Intellij Idea快速新建 SpringBoot 项目。 具体过程: 点击Intellij Idea左上角的 File--> New --> Project -->Spring Initializr 如果
阅读全文
摘要:使用场景 数据库密码直接使用明文不太安全,可以用druid对数据库密码进行加密解密。 Maven依赖: <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>1.2.8</version
阅读全文
摘要:环境安装 Dubbo使用zookeeper作为注册中心,首先要安装zookeeper。 Windows安装zookeeper如下: https://blog.csdn.net/qq_33316784/article/details/88563482 Linux安装zookeeper如下: https
阅读全文
摘要:IDEA启动项目报错 Caused by: java.io.FileNotFoundException: class path resource [.properties] cannot be opened because it does not exist 解决方法: 1.检查文件的路径是否正确,
阅读全文
摘要:问题 SpringBoot启动后,无法访问接口,报错如下: Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. There w
阅读全文
摘要:Dubbo添加过滤器 详情见: https://www.cnblogs.com/expiator/p/14557091.html 本文主要是用Dubbo添加过滤器,统计接口耗时 日志打印接口耗时 import com.alibaba.dubbo.common.Constants; import co
阅读全文
摘要:searchAfter深度分页 es一次只能查1万条数据,如果超过1万,会报错如下: "reason": { "type": "query_phase_execution_exception", "reason": "Result window is too large, from + size m
阅读全文
摘要:RestHighLevelClient es的客户端有 RestClient、 TransportClient 、 RestHighLevelClient, RestClient、 TransportClient不适合高版本的es,官方推荐使用RestHighLevelClient. maven配置
阅读全文