-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
1040 lines (701 loc) · 36.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<!--Setting-->
<meta charset="UTF-8">
<meta name="referrer" content="no-referrer" />
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta http-equiv="Cache-Control" content="no-siteapp">
<meta http-equiv="Cache-Control" content="no-transform">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta name="apple-mobile-web-app-capable" content="熊峰的博客 - Seifon's Blog">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no,email=no,adress=no">
<meta name="browsermode" content="application">
<meta name="screen-orientation" content="portrait">
<link rel="dns-prefetch" href="http://www.seifon.cn">
<!--SEO-->
<meta name="keywords" content="前端,雄风,熊风,js,jquery,javascript,html5,开发者,程序猿,程序媛,极客,编程,代码,开源,IT网站,Developer,Programmer,Coder,Geek,html,css,css3,用户体验,爬虫,python,java,jsoup" />
<meta name="description" content="Java开发" />
<meta name="robots" content="all" />
<meta name="google" content="all" />
<meta name="googlebot" content="all" />
<meta name="verify" content="all" />
<!--Title-->
<title>熊峰的博客 - Seifon's Blog</title>
<link rel="alternate" href="/atom.xml" title="熊峰的博客 - Seifon's Blog" type="application/atom+xml">
<link rel="icon" href="/favicon.ico">
<link rel="stylesheet" href="/css/bootstrap.min.css?rev=3.3.7">
<link rel="stylesheet" href="/css/font-awesome.min.css?rev=4.5.0">
<link rel="stylesheet" href="/css/style.css?rev=@@hash">
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?0a12e606ddb1f91f0a67ccb060b3c2eb";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<!--[if lte IE 8]>
<style>
html{ font-size: 1em }
</style>
<![endif]-->
<!--[if lte IE 9]>
<div style="ie">你使用的浏览器版本过低,为了你更好的阅读体验,请更新浏览器的版本或者使用其他现代浏览器,比如Chrome、Firefox、Safari等。</div>
<![endif]-->
<body>
<nav class="main-navigation">
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="navbar-header"><span class="nav-toggle-button collapsed" data-toggle="collapse" data-target="#main-menu" id="mnav">
<span class="sr-only"></span>
<i class="fa fa-bars"></i>
</span>
</div>
<div class="collapse navbar-collapse" id="main-menu">
<ul class="menu">
<li role="presentation" class="text-center">
<a href="/"><i class="fa fa-home"></i>熊峰的博客</a>
</li>
<li role="presentation" class="text-center">
<a href="/categories"><i class="fa fa-list"></i>分类</a>
</li>
<li role="presentation" class="text-center">
<a href="/archives"><i class="fa fa-archive"></i>归档</a>
</li>
<li role="presentation" class="text-center">
<a href="/tags"><i class="fa fa-tag"></i>标签</a>
</li>
<li role="presentation" class="text-center">
<a href="/about"><i class="fa fa-user"></i>关于</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</nav>
<section class="content-wrap">
<div class="container">
<div class="row">
<main class="col-md-8 main-content ">
<article class="post">
<div class="post-media">
<a href="/2019/08/04/JVM调优之探索CMS和G1的物理内存归还机制/">
<img class="img-ajax" src="/img/loading.gif" data-src="http://img.seifon.cn/cc51dc7f2f0260d88ca84c25ffee1dfa.png" alt="JVM调优之探索CMS和G1的物理内存归还机制">
</a>
</div>
<div class="post-content">
<div class="post-head home-post-head">
<h1 class="post-title">
<a href="/2019/08/04/JVM调优之探索CMS和G1的物理内存归还机制/">JVM调优之探索CMS和G1的物理内存归还机制</a>
</h1>
<div class="post-meta"> •
<time class="post-date" datetime="" title="">
2019年08月04日
</time>
</div>
</div>
<p class="brief">
前言:公司有一个资产统计系统,使用频率很低,但是要求在使用时查询速度快,因此想到做一些缓存放在内存中,在长时间没有使用,就持久化到磁盘中,并对垃圾进行回收,归还物理内存给操作系统,从而节省宝贵资源给其它业务系统。当我做好缓存时,却发现了一个棘手的问题,通过程序释放资源并通知GC回收资源后,堆内存的已用内存减少了,空闲内存增加了,可是进程占用系统内存却没有减少。查阅了很多资料,也尝试过很多次,都没有完美解决问题。直到后来看到一段评论谈及G1垃圾回收器,才恍然大悟。
接下来...
</p>
</div>
<footer class="post-footer clearfix">
<div class="pull-left tag-list">
<div class="post-meta">
<span class="categories-meta fa-wrap">
<i class="fa fa-folder-open-o"></i>
<a href="/categories/ ">
</a>
</span>
<span class="fa-wrap">
<i class="fa fa-tags"></i>
<span class="tags-meta">
</span>
</span>
</div>
</div>
<div class="post-permalink">
<a href="/2019/08/04/JVM调优之探索CMS和G1的物理内存归还机制/" class="btn btn-default">阅读全文</a>
</div>
</footer>
</article>
<article class="post">
<div class="post-media">
<a href="/2019/01/28/Feign-Stub挡板和Mock/">
<img class="img-ajax" src="/img/loading.gif" data-src="https://github.com/Seifon/FeignStubMock/raw/master/package_tree.png" alt="Feign Stub挡板和Mock">
</a>
</div>
<div class="post-content">
<div class="post-head home-post-head">
<h1 class="post-title">
<a href="/2019/01/28/Feign-Stub挡板和Mock/">Feign Stub挡板和Mock</a>
</h1>
<div class="post-meta"> •
<time class="post-date" datetime="" title="">
2019年01月28日
</time>
</div>
</div>
<p class="brief">
背景:在项目开发中,会有调用第三方接口的场景。当开发时,对方不愿意提供测试服务器给我们调用,或者有的接口会按调用次数进行计费。当联调时,第三方的测试服务器也可能会出现不稳定,如果他们的服务挂了,我们就一直等着服务恢复,那么这就相当影响效率了。如果我们在开发时,就定义一个挡板或者mock服务,在发起调用时,不直接调到第三方接口,而是调到我们自己的挡板代码或者mock服务,这样就可以避免这些问题了。
优势:
挡板代码,不需要侵入业务代码,可以根据入参做一些动态结果返回...
</p>
</div>
<footer class="post-footer clearfix">
<div class="pull-left tag-list">
<div class="post-meta">
<span class="categories-meta fa-wrap">
<i class="fa fa-folder-open-o"></i>
<a href="/categories/ ">
</a>
</span>
<span class="fa-wrap">
<i class="fa fa-tags"></i>
<span class="tags-meta">
</span>
</span>
</div>
</div>
<div class="post-permalink">
<a href="/2019/01/28/Feign-Stub挡板和Mock/" class="btn btn-default">阅读全文</a>
</div>
</footer>
</article>
<article class="post">
<div class="post-media">
<a href="/2018/12/08/踩坑-Spring-Cloud-Hystrix-线程池队列配置/">
<img class="img-ajax" src="/img/loading.gif" data-src="http://img.seifon.cn/a372d90344c968f5ef1631ae13453e6d.png" alt="踩坑 Spring Cloud Hystrix 线程池队列配置">
</a>
</div>
<div class="post-content">
<div class="post-head home-post-head">
<h1 class="post-title">
<a href="/2018/12/08/踩坑-Spring-Cloud-Hystrix-线程池队列配置/">踩坑 Spring Cloud Hystrix 线程池队列配置</a>
</h1>
<div class="post-meta"> •
<time class="post-date" datetime="" title="">
2018年12月08日
</time>
</div>
</div>
<p class="brief">
背景:有一次在生产环境,突然出现了很多笔还款单被挂起,后来排查原因,发现是内部系统调用时出现了Hystrix调用异常。在开发过程中,因为核心线程数设置的比较大,没有出现这种异常。放到了测试环境,偶尔有出现这种情况,后来在网上查找解决方案,网上的方案是调整maxQueueSize属性就好了,当时调整了一下,确实有所改善。可没想到在生产环境跑了一段时间后却又出现这种了情况,此时我第一想法就是去查看maxQueueSize属性,可是maxQueueSize属性是设置值了。当时...
</p>
</div>
<footer class="post-footer clearfix">
<div class="pull-left tag-list">
<div class="post-meta">
<span class="categories-meta fa-wrap">
<i class="fa fa-folder-open-o"></i>
<a href="/categories/Spring">
Spring
</a>
</span>
<span class="fa-wrap">
<i class="fa fa-tags"></i>
<span class="tags-meta">
<a href="/tags/Hystrix" title='Hystrix'>
Hystrix
</a>
<a href="/tags/Spring Cloud" title='Spring Cloud'>
Spring Cloud
</a>
<a href="/tags/多线程" title='多线程'>
多线程
</a>
</span>
</span>
</div>
</div>
<div class="post-permalink">
<a href="/2018/12/08/踩坑-Spring-Cloud-Hystrix-线程池队列配置/" class="btn btn-default">阅读全文</a>
</div>
</footer>
</article>
<article class="post">
<div class="post-media">
<a href="/2018/04/30/Spring统一返回Json工具类,带分页信息/">
<img class="img-ajax" src="/img/loading.gif" data-src="http://ww1.sinaimg.cn/large/005zWjpngy1fqv13ul9pcj30m80d30ts.jpg" alt="Spring统一返回Json工具类,带分页信息">
</a>
</div>
<div class="post-content">
<div class="post-head home-post-head">
<h1 class="post-title">
<a href="/2018/04/30/Spring统一返回Json工具类,带分页信息/">Spring统一返回Json工具类,带分页信息</a>
</h1>
<div class="post-meta"> •
<time class="post-date" datetime="" title="">
2018年04月30日
</time>
</div>
</div>
<p class="brief">
前言:
项目做前后端分离时,我们会经常提供Json数据给前端,如果有一个统一的Json格式返回工具类,那么将大大提高开发效率和减低沟通成本。
此Json响应工具类,支持带分页信息,支持泛型,支持HttpStatus标准返回码
效果预览:
步入正题:1. Resp工具类123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354...
</p>
</div>
<footer class="post-footer clearfix">
<div class="pull-left tag-list">
<div class="post-meta">
<span class="categories-meta fa-wrap">
<i class="fa fa-folder-open-o"></i>
<a href="/categories/Restful">
Restful
</a>
</span>
<span class="fa-wrap">
<i class="fa fa-tags"></i>
<span class="tags-meta">
<a href="/tags/Rest" title='Rest'>
Rest
</a>
<a href="/tags/Json" title='Json'>
Json
</a>
<a href="/tags/Util" title='Util'>
Util
</a>
</span>
</span>
</div>
</div>
<div class="post-permalink">
<a href="/2018/04/30/Spring统一返回Json工具类,带分页信息/" class="btn btn-default">阅读全文</a>
</div>
</footer>
</article>
<article class="post">
<div class="post-media">
<a href="/2018/04/21/利用Filter和拦截器,将用户信息动态传入Request方法/">
<img class="img-ajax" src="/img/loading.gif" data-src="https://ww1.sinaimg.cn/large/005zWjpngy1fqv2al6j9sj30go09etbi.jpg" alt="利用Filter和Spring拦截器,将用户信息动态传入Request方法">
</a>
</div>
<div class="post-content">
<div class="post-head home-post-head">
<h1 class="post-title">
<a href="/2018/04/21/利用Filter和拦截器,将用户信息动态传入Request方法/">利用Filter和Spring拦截器,将用户信息动态传入Request方法</a>
</h1>
<div class="post-meta"> •
<time class="post-date" datetime="" title="">
2018年04月21日
</time>
</div>
</div>
<p class="brief">
前言:
在开发当中,经常会验证用户登录状态和获取用户信息。如果每次都手动调用用户信息查询接口,会非常的繁琐,而且代码冗余。为了提高开发效率,因此就有了今天这篇文章。
思路:
用户请求我们的方法会携带一个Token,通过Filter过滤器将会员信息查出来并放到request请求参数中。接着在Cotroller层的请求方法中接收一个MemberDeatails类型的参数,就能直接获得会员信息了。
详细步骤:1. Gradle引入需要的Jar包:1compile &quo...
</p>
</div>
<footer class="post-footer clearfix">
<div class="pull-left tag-list">
<div class="post-meta">
<span class="categories-meta fa-wrap">
<i class="fa fa-folder-open-o"></i>
<a href="/categories/Spring">
Spring
</a>
</span>
<span class="fa-wrap">
<i class="fa fa-tags"></i>
<span class="tags-meta">
<a href="/tags/拦截器" title='拦截器'>
拦截器
</a>
<a href="/tags/Filter" title='Filter'>
Filter
</a>
</span>
</span>
</div>
</div>
<div class="post-permalink">
<a href="/2018/04/21/利用Filter和拦截器,将用户信息动态传入Request方法/" class="btn btn-default">阅读全文</a>
</div>
</footer>
</article>
<article class="post">
<div class="post-content">
<div class="post-head home-post-head">
<h1 class="post-title">
<a href="/2017/09/05/Nginx的五种负载算法模式/">Nginx的五种负载算法模式</a>
</h1>
<div class="post-meta"> •
<time class="post-date" datetime="" title="">
2017年09月05日
</time>
</div>
</div>
<p class="brief">
1、轮询(默认)每个请求按时间顺序逐一分配到不同的后端服务器,如果后端服务器down掉,能自动剔除。
例如:
1234upstream bakend &#123; server 192.168.0.14; server 192.168.0.15; &#125;
2、weight权重指定轮询几率,weight和访问比率成正比,用于后端服务器性能不均的情况。
例如:
1234upstream bakend &#123; server 192....
</p>
</div>
<footer class="post-footer clearfix">
<div class="pull-left tag-list">
<div class="post-meta">
<span class="categories-meta fa-wrap">
<i class="fa fa-folder-open-o"></i>
<a href="/categories/Nginx">
Nginx
</a>
</span>
<span class="fa-wrap">
<i class="fa fa-tags"></i>
<span class="tags-meta">
<a href="/tags/Nginx" title='Nginx'>
Nginx
</a>
<a href="/tags/负载均衡" title='负载均衡'>
负载均衡
</a>
</span>
</span>
</div>
</div>
<div class="post-permalink">
<a href="/2017/09/05/Nginx的五种负载算法模式/" class="btn btn-default">阅读全文</a>
</div>
</footer>
</article>
<article class="post">
<div class="post-media">
<a href="/2017/09/05/高CPU占用调优/">
<img class="img-ajax" src="/img/loading.gif" data-src="http://ww1.sinaimg.cn/large/8e24145egy1fjqjvwb86vj20n804f416.jpg" alt="高CPU占用调优">
</a>
</div>
<div class="post-content">
<div class="post-head home-post-head">
<h1 class="post-title">
<a href="/2017/09/05/高CPU占用调优/">高CPU占用调优</a>
</h1>
<div class="post-meta"> •
<time class="post-date" datetime="" title="">
2017年09月05日
</time>
</div>
</div>
<p class="brief">
根据top命令,发现PID为28555的Java进程占用CPU高达200%,出现故障。
通过查看进程1ps aux | grep PID
可以进一步确定是tomcat进程出现了问题。
但是,怎么定位到具体线程或者代码呢?
首先显示线程列表:1ps -mp pid -o THREAD,tid,time
找到了耗时最高的线程28802,占用CPU时间快两个小时了!
其次将需要的线程ID转换为16进制格式:1printf &quot;%x\n&quot; tid
最后打印...
</p>
</div>
<footer class="post-footer clearfix">
<div class="pull-left tag-list">
<div class="post-meta">
<span class="categories-meta fa-wrap">
<i class="fa fa-folder-open-o"></i>
<a href="/categories/JAVA调优">
JAVA调优
</a>
</span>
<span class="fa-wrap">
<i class="fa fa-tags"></i>
<span class="tags-meta">
<a href="/tags/调优" title='调优'>
调优
</a>
<a href="/tags/Jstack" title='Jstack'>
Jstack
</a>
<a href="/tags/栈" title='栈'>
栈
</a>
</span>
</span>
</div>
</div>
<div class="post-permalink">
<a href="/2017/09/05/高CPU占用调优/" class="btn btn-default">阅读全文</a>
</div>
</footer>
</article>
<article class="post">
<div class="post-content">
<div class="post-head home-post-head">
<h1 class="post-title">
<a href="/2017/07/09/开关指定端口,以80为例/">开关指定端口,以80为例</a>
</h1>
<div class="post-meta"> •
<time class="post-date" datetime="" title="">
2017年07月09日
</time>
</div>
</div>
<p class="brief">
开启80端口:1iptables -I INPUT -p tcp --dport 80 -j ACCEPT…
</p>
</div>
<footer class="post-footer clearfix">
<div class="pull-left tag-list">
<div class="post-meta">
<span class="categories-meta fa-wrap">
<i class="fa fa-folder-open-o"></i>
<a href="/categories/Iptables">
Iptables
</a>
</span>
<span class="fa-wrap">
<i class="fa fa-tags"></i>
<span class="tags-meta">
<a href="/tags/centos" title='centos'>
centos
</a>
<a href="/tags/linux" title='linux'>
linux
</a>
<a href="/tags/iptables" title='iptables'>
iptables
</a>
</span>
</span>
</div>
</div>
<div class="post-permalink">
<a href="/2017/07/09/开关指定端口,以80为例/" class="btn btn-default">阅读全文</a>
</div>
</footer>
</article>
<article class="post">
<div class="post-media">
<a href="/2017/07/08/Jenkins环境搭建/">
<img class="img-ajax" src="/img/loading.gif" data-src="http://ww1.sinaimg.cn/large/8e24145egy1fi82wdsq6pj211t0iego2.jpg" alt="Jenkins环境搭建">
</a>
</div>
<div class="post-content">
<div class="post-head home-post-head">
<h1 class="post-title">
<a href="/2017/07/08/Jenkins环境搭建/">Jenkins环境搭建</a>
</h1>
<div class="post-meta"> •
<time class="post-date" datetime="" title="">
2017年07月08日
</time>
</div>
</div>
<p class="brief">
上传以下的包到/tmp/目录下:1234567891011jdk-8u121-linux-x64.tar.gzapache-tomcat-7.0.75.tar.gzapache-maven-3.5.0-bin.tar.gzMySQL-client-5.5.52-1.el6.x86_64.rpmMySQL-devel-5.5.52-1.el6.x86_64.rpmMySQL-server-5.5.52-1.el6.x86_64.rpmMySQL-shared-5.5.52...
</p>
</div>
<footer class="post-footer clearfix">
<div class="pull-left tag-list">
<div class="post-meta">
<span class="categories-meta fa-wrap">
<i class="fa fa-folder-open-o"></i>
<a href="/categories/Jenkins">
Jenkins
</a>
</span>
<span class="fa-wrap">
<i class="fa fa-tags"></i>
<span class="tags-meta">
<a href="/tags/Jenkins" title='Jenkins'>
Jenkins
</a>
<a href="/tags/CI" title='CI'>
CI
</a>
</span>
</span>
</div>
</div>
<div class="post-permalink">
<a href="/2017/07/08/Jenkins环境搭建/" class="btn btn-default">阅读全文</a>
</div>
</footer>
</article>
<article class="post">
<div class="post-content">
<div class="post-head home-post-head">
<h1 class="post-title">
<a href="/2017/06/27/Yaml语法说明/">Yaml语法说明</a>
</h1>
<div class="post-meta"> •
<time class="post-date" datetime="" title="">
2017年06月27日
</time>
</div>
</div>
<p class="brief">
简介YAML 是专门用来写配置文件的语言,非常简洁和强大,远比 JSON 格式方便。
语法规则
大小写敏感
使用缩进表示层级关系
缩进时不允许使用Tab键,只允许使用空格。
缩进的空格数目不重要,只要相同层级的元素左侧对齐即可
:冒号后面必须有空格
#表示注释,从这个字符一直到行尾,都会被解析器忽略。
YAML支持三种数据结构:
对象:键值对的集合,又称为映射(mapping)/ 哈希(hashes) / 字典(dictionary)
数组:一组按次序排列的值,又称为...
</p>
</div>
<footer class="post-footer clearfix">
<div class="pull-left tag-list">
<div class="post-meta">
<span class="categories-meta fa-wrap">
<i class="fa fa-folder-open-o"></i>
<a href="/categories/Yaml">
Yaml
</a>
</span>
<span class="fa-wrap">
<i class="fa fa-tags"></i>
<span class="tags-meta">
<a href="/tags/Yaml" title='Yaml'>
Yaml
</a>
<a href="/tags/yml" title='yml'>
yml
</a>
</span>
</span>
</div>
</div>
<div class="post-permalink">
<a href="/2017/06/27/Yaml语法说明/" class="btn btn-default">阅读全文</a>
</div>
</footer>
</article>
<nav class="pagination" role="navigation">
<div id="page-nav">
<span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><a class="extend next" rel="next" href="/page/2/"><i class='fa fa-angle-right'></i></a>
</div>
</nav>
</main>
<aside class="col-md-4 sidebar">
<div class="widget">
<h3 class="title">搜索</h3>
<div id="search-form">
<div id="result-mask" class="hide"></div>
<div class="search-area">
<input id="search-key" type="search" autocomplete="off" placeholder="搜点什么呢?">
<button type="button" class="search-form-submit" id="search-local">站内搜索</button>
</div>
<div id="result-wrap" class="hide">
<div id="search-result"></div>
</div>
<div class="hide">
<template id="search-tpl">
<div class="item">
<a href="/{path}" title="{title}">
<div class="title">{title}</div>
<div class="content">{content}</div>
</a>
</div>
</template>
</div>
</div>
</div>
<div class="widget notification">
<h3 class="title">网站公告</h3>
<div>
<p>
<b>公众号</b>:熊峰的博客<br/>
<b>Q Q 群</b>:106214222<br/>
<div style="text-align: center;">
<img src="http://wx1.sinaimg.cn/large/007cGLmlly1ftivt065quj306o095t9a.jpg" alt="QQ群:106214222">
</div>
</p>
</div>
</div>
<div class="widget">
<div class="about-me">
<img src="http://ww1.sinaimg.cn/large/005zWjpngy1fqpaewa9faj307607674q.jpg" alt="熊峰的博客 - Seifon's Blog">
<h2>熊峰-Seifon</h2>
<p>不定期为大家分享开发当中的小经验</p>
</div>
</div>
<div class="widget">
<h3 class="title">社交</h3>
<div class="content social">
<a href="//github.com/seifon" rel="external nofollow" title="GitHub" target="_blank">
<i class="github fa fa-github"></i>
</a>
<a href="//gitee.com/seifon" rel="external nofollow" title="Git@OSC" target="_blank">
<i class="git fa fa-git"></i>
</a>
<a href="mailto:[email protected]" rel="external nofollow" title="邮箱" target="_blank">
<i class="envelope-o fa fa-envelope-o"></i>
</a>
<a href="/atom.xml" rel="external nofollow" title="RSS" target="_blank">
<i class="feed fa fa-feed"></i>
</a>
</div>
</div>
<div class="widget">
<h3 class="title">分类</h3>
<ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/Iptables/"><i class="fa" aria-hidden="true">Iptables</i></a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/JAVA调优/"><i class="fa" aria-hidden="true">JAVA调优</i></a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Jenkins/"><i class="fa" aria-hidden="true">Jenkins</i></a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Mysql/"><i class="fa" aria-hidden="true">Mysql</i></a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Nginx/"><i class="fa" aria-hidden="true">Nginx</i></a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Restful/"><i class="fa" aria-hidden="true">Restful</i></a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Spring/"><i class="fa" aria-hidden="true">Spring</i></a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Yaml/"><i class="fa" aria-hidden="true">Yaml</i></a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/算法/"><i class="fa" aria-hidden="true">算法</i></a><span class="category-list-count">1</span></li></ul>
</div>
<div class="widget">
<h3 class="title">归档</h3>
<ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/08/"><i class="fa" aria-hidden="true">八月 2019</i></a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/01/"><i class="fa" aria-hidden="true">一月 2019</i></a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/12/"><i class="fa" aria-hidden="true">十二月 2018</i></a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/04/"><i class="fa" aria-hidden="true">四月 2018</i></a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/09/"><i class="fa" aria-hidden="true">九月 2017</i></a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/07/"><i class="fa" aria-hidden="true">七月 2017</i></a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/06/"><i class="fa" aria-hidden="true">六月 2017</i></a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/05/"><i class="fa" aria-hidden="true">五月 2017</i></a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/04/"><i class="fa" aria-hidden="true">四月 2017</i></a><span class="archive-list-count">1</span></li></ul>
</div>
<div class="widget">
<h3 class="title">标签云</h3>
<div class="content tag-cloud">
<a href="/tags/CI/" style="font-size: 10px;">CI</a> <a href="/tags/Filter/" style="font-size: 10px;">Filter</a> <a href="/tags/Hystrix/" style="font-size: 10px;">Hystrix</a> <a href="/tags/Jenkins/" style="font-size: 10px;">Jenkins</a> <a href="/tags/Json/" style="font-size: 10px;">Json</a> <a href="/tags/Jstack/" style="font-size: 10px;">Jstack</a> <a href="/tags/Mysql/" style="font-size: 10px;">Mysql</a> <a href="/tags/Nginx/" style="font-size: 10px;">Nginx</a> <a href="/tags/Rest/" style="font-size: 10px;">Rest</a> <a href="/tags/Spring-Cloud/" style="font-size: 10px;">Spring Cloud</a> <a href="/tags/Util/" style="font-size: 10px;">Util</a> <a href="/tags/Yaml/" style="font-size: 10px;">Yaml</a> <a href="/tags/centos/" style="font-size: 20px;">centos</a> <a href="/tags/iptables/" style="font-size: 20px;">iptables</a> <a href="/tags/linux/" style="font-size: 20px;">linux</a> <a href="/tags/yml/" style="font-size: 10px;">yml</a> <a href="/tags/备份/" style="font-size: 10px;">备份</a> <a href="/tags/多线程/" style="font-size: 10px;">多线程</a> <a href="/tags/定时/" style="font-size: 10px;">定时</a> <a href="/tags/容灾/" style="font-size: 10px;">容灾</a> <a href="/tags/拦截器/" style="font-size: 10px;">拦截器</a> <a href="/tags/数据库/" style="font-size: 10px;">数据库</a> <a href="/tags/数据结构/" style="font-size: 10px;">数据结构</a> <a href="/tags/栈/" style="font-size: 10px;">栈</a> <a href="/tags/算法/" style="font-size: 10px;">算法</a> <a href="/tags/调优/" style="font-size: 10px;">调优</a> <a href="/tags/负载均衡/" style="font-size: 10px;">负载均衡</a> <a href="/tags/防火墙/" style="font-size: 20px;">防火墙</a> <a href="/tags/面试/" style="font-size: 10px;">面试</a>
</div>
</div>
<div class="widget">
<h3 class="title">友链</h3>
<div class="content friends-link">
<a href="https://www.seifon.cn/" class="fa" target="_blank">熊峰的博客</a>
</div>
</div>
</aside>
</div>
</div>
</section>
<footer class="main-footer">