上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 21 下一页
摘要: 1.由于rabbitMq是用Erlang语言写的,因此要先安装Erlang环境 下载Erlang :http://www.rabbitmq.com/releases/erlang/erlang-19.0.4-1.el7.centos.x86_64.rpm 下载rabbitMq:安装包 http:// 阅读全文
posted @ 2019-08-09 13:20 yangxiaohui227 阅读(195) 评论(0) 推荐(0)
摘要: String[] activeProfiles = env.getActiveProfiles();//获取当前是启用哪一个个配置文件 System.out.println(Arrays.toString(activeProfiles)); String[] defaultProfiles = env.getDefaultProfiles(); System.out.println(Arrays. 阅读全文
posted @ 2019-08-08 17:35 yangxiaohui227 阅读(3117) 评论(0) 推荐(0)
摘要: //为index创建mapping,index相当于mysql的数据库,数据库里的表也要给各个字段创建类型,所以index也要给字段事先设置好类型: 使用postMan或者其他工具创建:(此处我使用postMan,创建一个名为shop的index,type是order-- type相等于mysql的 阅读全文
posted @ 2019-07-24 12:36 yangxiaohui227 阅读(1040) 评论(0) 推荐(0)
摘要: //在resource文件夹下创建一个db.properties文件 里面存2个值: //加载该文件内容: 阅读全文
posted @ 2019-07-17 12:04 yangxiaohui227 阅读(778) 评论(0) 推荐(0)
摘要: //ip地址的获取:非原创,之前在其他地方看到,拿过来备份下: 阅读全文
posted @ 2019-07-16 16:41 yangxiaohui227 阅读(252) 评论(0) 推荐(0)
摘要: //在开发中,经常会遇到有些需求需要app强更,思路大概:所有请求都要带上版本号和渠道(android或ios),然后网关对这些版本号判断,如果发现这些版本号是很旧的,就返回错误码或者标志符告诉app,app做对应的逻辑,如提示用户点击更新之类的 首先在application.yml里配置是否需要强 阅读全文
posted @ 2019-07-16 14:08 yangxiaohui227 阅读(1710) 评论(0) 推荐(0)
摘要: //使用2个类的run方法都可以在项目启动时加载配置,唯一不同的是他们的参数不一样,CommandLineRunner的run方法参数是基本类型,ApplicationRunner的run方法参数是一个ApplicationArguments对象 下面做个ip黑名单的demo: 首先在applica 阅读全文
posted @ 2019-07-16 10:31 yangxiaohui227 阅读(485) 评论(0) 推荐(0)
摘要: package com.example.demo.util; import com.auth0.jwt.JWT; import com.auth0.jwt.JWTVerifier; import com.auth0.jwt.algorithms.Algorithm; import com.auth0.jwt.exceptions.JWTVerificationException; import... 阅读全文
posted @ 2019-07-15 18:50 yangxiaohui227 阅读(1778) 评论(0) 推荐(0)
摘要: 国际化 ,英文叫 internationalization 单词太长 ,又被简称为 i18n(取头取尾中间有18个字母); 主要涉及3个类: Locale用来设置定制的语言和国家代码 ResourceBundle 用来加载国际化资源文件 MessageFormat 用来格式化占位符 //先看结构: 阅读全文
posted @ 2019-07-13 14:58 yangxiaohui227 阅读(6023) 评论(0) 推荐(0)
摘要: private void setFiledValue(String fileName,Object value,Class clz) throws IllegalAccessException, InstantiationException, InvocationTargetException { //该方式找不到对应字段不会报错 if(StringUtils... 阅读全文
posted @ 2019-07-12 15:11 yangxiaohui227 阅读(2189) 评论(0) 推荐(0)
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 21 下一页