- 博客(11)
- 收藏
- 关注
原创 java代码获取eureka 注册的服务
话不多说直接上代码:@Autowiredprivate DiscoveryClient discoveryClient;@GetMapping("/serviceurl")@ApiOperation(value = “服务信息获取”, notes = “服务信息获取”)public StateResult serviceUrl() {StateResult stateResult = new StateResult();Map<String, List> msl = new Has
2021-03-09 16:38:41 631
原创 swagger 404
1.原理就不多说了。直接加入:@Configurationpublic class WebConfig extends WebMvcConfigurerAdapter {@Overridepublic void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("swagger-ui.html") .addResourceLocations("clas
2021-03-09 16:27:58 194
原创 mac brew安装kafka
brew install kafka 2…/kafka-server-start /usr/local/etc/kafka/server.properties
2021-03-06 23:14:13 153
原创 mac 启动zookeeper :Starting zookeeper … FAILED TO START
今天安装zookeeper,结果 Starting zookeeper … FAILED TO START郁闷郁闷。按着简书的步骤一步不差。结果最后还得找错。简书非说下载不带bin的jar包。这是行不通的。亲测。下载待bin的。Starting zookeeper … FAILED TO STARThttp://mirrors.hust.edu.cn/apache/zookeeper/stable/...
2021-03-06 22:53:00 485 1
原创 springboot集成swagger报404问题
springboot集成swagger报404问题@Configuration@EnableSwagger2public class SwaggerConfig extends WebMvcConfigurationSupport {@Beanpublic Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2) .pathMapping("/") .sel
2021-03-02 20:23:19 205
原创 JDBC连接MySQL报错Unknown system variable ‘query_cache_size‘
JDBC连接MySQL报错Unknown system variable ‘query_cache_size’网上查了原因是mysql-connecter-java的版本过低,很显然是数据库驱动程序与数据库版本不对应解决办法:如 mybatis使用 mysql-5.1.14的驱动程序,而mybatis配置的数据源连接的是 mysql-8.0.11 ,修改 pom文件即可,如下:mysqlmysql-connector-java8.0.11根据官方的说法是 :The query cach
2021-02-26 15:56:49 367
原创 java.lang.StringIndexOutOfBoundsException: String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1字符串截取下标越界记住加入判断
2020-12-20 16:19:28 337
原创 Mac环境下RabbitMq安装
Mac环境下RabbitMq安装安装brew install rabbitmq2.进入目录cd /usr/local/Cellar/rabbitmq/3.7.52.启动:brew services start rabbitmq3.当前窗口启动rabbitmq-server4.启动控制台之前需要先开启插件./rabbitmq-plugins enable rabbitmq_management5.进入控制台:http://localhost:15672/6.用户名和密码:gue
2020-12-18 17:23:33 182 1
原创 mac安装elasticsearch可视化工具
mac安装elasticsearch可视化工具安装:brew install kibana启动 :brew services start kibana3打开浏览器:localhost:5601
2020-12-18 16:54:40 1091 1
原创 mac如何安装ElasticSearch
mac如何安装ElasticSearch安装:1.brew install elasticsearch2.运行es:brew services start elasticsearch3本地浏览器访问:http://localhost:9200
2020-12-18 16:43:04 149 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人