1
0
mirror of https://github.com/apachecn/spring-boot-doc-zh.git synced 2025-06-06 09:08:37 +00:00
This commit is contained in:
wizardforcel 2018-11-26 15:20:07 +08:00
commit cdd1ca7535
123 changed files with 8635 additions and 0 deletions

115
.gitignore vendored Normal file
View File

@ -0,0 +1,115 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# dotenv
.env
# virtualenv
.venv
venv/
ENV/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.DS_Store
# gitbook
_book
# node.js
node_modules
# windows
Thumbs.db
# word
~$*.docx
~$*.doc

25
.travis.yml Normal file
View File

@ -0,0 +1,25 @@
language: python
python: 3.6
install:
- pip install -r requirement.txt
script:
- mkdocs build
after_script:
- cd site
- git init
- git config user.name ${GH_UN}
- git config user.email ${GH_EMAIL}
- git add -A
- git commit -am "$(date "+%Y-%m-%d %H:%M:%S")"
- git push "https://${GH_TOKEN}@github.com/${GH_USER}/${GH_REPO}.git" master:${GH_BRANCH} -f
env:
global:
- GH_UN=jiangzhonglian
- GH_EMAIL=jiang-s@163.com
- GH_USER=apachecn
- GH_REPO=spring-boot-doc-zh
- GH_BRANCH=gh-pages

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# Spring Boot 1.5.2 中文文档
+ [在线阅读](https://spring-boot.apachecn.org)

4
custom_theme/404.html Normal file
View File

@ -0,0 +1,4 @@
{% extends "base.html" %}
{% block content %}
<h1>404 - Not found</h1>
{% endblock %}

0
custom_theme/__init__.py Normal file
View File

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,13 @@
/*!
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, SOFTWARE
* DISTRIBUTED UNDER THE LICENSE IS DISTRIBUTED ON AN "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
* SEE THE LICENSE FOR THE SPECIFIC LANGUAGE GOVERNING PERMISSIONS AND
* LIMITATIONS UNDER THE LICENSE.
*/@font-face{font-family:"Material Icons";font-style:normal;font-weight:400;src:local("Material Icons"),local("MaterialIcons-Regular"),url("specimen/MaterialIcons-Regular.woff2") format("woff2"),url("specimen/MaterialIcons-Regular.woff") format("woff"),url("specimen/MaterialIcons-Regular.ttf") format("truetype")}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 B

View File

@ -0,0 +1,20 @@
<svg xmlns="http://www.w3.org/2000/svg" width="352" height="448"
viewBox="0 0 352 448" id="__bitbucket">
<path fill="currentColor" d="M203.75 214.75q2 15.75-12.625 25.25t-27.875
1.5q-9.75-4.25-13.375-14.5t-0.125-20.5 13-14.5q9-4.5 18.125-3t16 8.875
6.875 16.875zM231.5 209.5q-3.5-26.75-28.25-41t-49.25-3.25q-15.75
7-25.125 22.125t-8.625 32.375q1 22.75 19.375 38.75t41.375 14q22.75-2
38-21t12.5-42zM291.25
74q-5-6.75-14-11.125t-14.5-5.5-17.75-3.125q-72.75-11.75-141.5 0.5-10.75
1.75-16.5 3t-13.75 5.5-12.5 10.75q7.5 7 19 11.375t18.375 5.5 21.875
2.875q57 7.25 112 0.25 15.75-2 22.375-3t18.125-5.375 18.75-11.625zM305.5
332.75q-2 6.5-3.875 19.125t-3.5 21-7.125 17.5-14.5 14.125q-21.5
12-47.375 17.875t-50.5 5.5-50.375-4.625q-11.5-2-20.375-4.5t-19.125-6.75-18.25-10.875-13-15.375q-6.25-24-14.25-73l1.5-4
4.5-2.25q55.75 37 126.625 37t126.875-37q5.25 1.5 6 5.75t-1.25 11.25-2
9.25zM350.75 92.5q-6.5 41.75-27.75 163.75-1.25 7.5-6.75 14t-10.875
10-13.625 7.75q-63 31.5-152.5
22-62-6.75-98.5-34.75-3.75-3-6.375-6.625t-4.25-8.75-2.25-8.5-1.5-9.875-1.375-8.75q-2.25-12.5-6.625-37.5t-7-40.375-5.875-36.875-5.5-39.5q0.75-6.5
4.375-12.125t7.875-9.375 11.25-7.5 11.5-5.625 12-4.625q31.25-11.5
78.25-16 94.75-9.25 169 12.5 38.75 11.5 53.75 30.5 4 5 4.125
12.75t-1.375 13.5z" />
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448"
viewBox="0 0 416 448" id="__github">
<path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19-18.125
8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19 18.125-8.5
18.125 8.5 10.75 19 3.125 20.5zM320 304q0 10-3.125 20.5t-10.75
19-18.125 8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19
18.125-8.5 18.125 8.5 10.75 19 3.125 20.5zM360
304q0-30-17.25-51t-46.75-21q-10.25 0-48.75 5.25-17.75 2.75-39.25
2.75t-39.25-2.75q-38-5.25-48.75-5.25-29.5 0-46.75 21t-17.25 51q0 22 8
38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0
37.25-1.75t35-7.375 30.5-15 20.25-25.75 8-38.375zM416 260q0 51.75-15.25
82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5-41.75
1.125q-19.5 0-35.5-0.75t-36.875-3.125-38.125-7.5-34.25-12.875-30.25-20.25-21.5-28.75q-15.5-30.75-15.5-82.75
0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25
30.875q36.75-8.75 77.25-8.75 37 0 70 8 26.25-20.5
46.75-30.25t47.25-9.75q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34
99.5z" />
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,38 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500"
viewBox="0 0 500 500" id="__gitlab">
<g transform="translate(156.197863, 1.160267)">
<path fill="currentColor"
d="M93.667,473.347L93.667,473.347l90.684-279.097H2.983L93.667,
473.347L93.667,473.347z" />
</g>
<g transform="translate(28.531199, 1.160800)" opacity="0.7">
<path fill="currentColor"
d="M221.333,473.345L130.649,194.25H3.557L221.333,473.345L221.333,
473.345z" />
</g>
<g transform="translate(0.088533, 0.255867)" opacity="0.5">
<path fill="currentColor"
d="M32,195.155L32,195.155L4.441,279.97c-2.513,7.735,0.24,16.21,6.821,
20.99l238.514,173.29 L32,195.155L32,195.155z" />
</g>
<g transform="translate(29.421866, 280.255593)">
<path fill="currentColor"
d="M2.667-84.844h127.092L75.14-252.942c-2.811-8.649-15.047-8.649-17.856,
0L2.667-84.844 L2.667-84.844z" />
</g>
<g transform="translate(247.197860, 1.160800)" opacity="0.7">
<path fill="currentColor"
d="M2.667,473.345L93.351,194.25h127.092L2.667,473.345L2.667,
473.345z" />
</g>
<g transform="translate(246.307061, 0.255867)" opacity="0.5">
<path fill="currentColor"
d="M221.334,195.155L221.334,195.155l27.559,84.815c2.514,7.735-0.24,
16.21-6.821,20.99 L3.557,474.25L221.334,195.155L221.334,195.155z" />
</g>
<g transform="translate(336.973725, 280.255593)">
<path fill="currentColor"
d="M130.667-84.844H3.575l54.618-168.098c2.811-8.649,15.047-8.649,
17.856,0L130.667-84.844 L130.667-84.844z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,m,i;e.da=function(){this.pipeline.reset(),this.pipeline.add(e.da.trimmer,e.da.stopWordFilter,e.da.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.da.stemmer))},e.da.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA--",e.da.trimmer=e.trimmerSupport.generateTrimmer(e.da.wordCharacters),e.Pipeline.registerFunction(e.da.trimmer,"trimmer-da"),e.da.stemmer=(r=e.stemmerSupport.Among,m=e.stemmerSupport.SnowballProgram,i=new function(){var i,t,n,s=[new r("hed",-1,1),new r("ethed",0,1),new r("ered",-1,1),new r("e",-1,1),new r("erede",3,1),new r("ende",3,1),new r("erende",5,1),new r("ene",3,1),new r("erne",3,1),new r("ere",3,1),new r("en",-1,1),new r("heden",10,1),new r("eren",10,1),new r("er",-1,1),new r("heder",13,1),new r("erer",13,1),new r("s",-1,2),new r("heds",16,1),new r("es",16,1),new r("endes",18,1),new r("erendes",19,1),new r("enes",18,1),new r("ernes",18,1),new r("eres",18,1),new r("ens",16,1),new r("hedens",24,1),new r("erens",24,1),new r("ers",16,1),new r("ets",16,1),new r("erets",28,1),new r("et",-1,1),new r("eret",30,1)],o=[new r("gd",-1,-1),new r("dt",-1,-1),new r("gt",-1,-1),new r("kt",-1,-1)],a=[new r("ig",-1,1),new r("lig",0,1),new r("elig",1,1),new r("els",-1,1),new r("løst",-1,2)],d=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],u=[239,254,42,3,0,0,0,0,0,0,0,0,0,0,0,0,16],c=new m;function l(){var e,r=c.limit-c.cursor;c.cursor>=t&&(e=c.limit_backward,c.limit_backward=t,c.ket=c.cursor,c.find_among_b(o,4)?(c.bra=c.cursor,c.limit_backward=e,c.cursor=c.limit-r,c.cursor>c.limit_backward&&(c.cursor--,c.bra=c.cursor,c.slice_del())):c.limit_backward=e)}this.setCurrent=function(e){c.setCurrent(e)},this.getCurrent=function(){return c.getCurrent()},this.stem=function(){var e,r=c.cursor;return function(){var e,r=c.cursor+3;if(t=c.limit,0<=r&&r<=c.limit){for(i=r;;){if(e=c.cursor,c.in_grouping(d,97,248)){c.cursor=e;break}if((c.cursor=e)>=c.limit)return;c.cursor++}for(;!c.out_grouping(d,97,248);){if(c.cursor>=c.limit)return;c.cursor++}(t=c.cursor)<i&&(t=i)}}(),c.limit_backward=r,c.cursor=c.limit,function(){var e,r;if(c.cursor>=t&&(r=c.limit_backward,c.limit_backward=t,c.ket=c.cursor,e=c.find_among_b(s,32),c.limit_backward=r,e))switch(c.bra=c.cursor,e){case 1:c.slice_del();break;case 2:c.in_grouping_b(u,97,229)&&c.slice_del()}}(),c.cursor=c.limit,l(),c.cursor=c.limit,function(){var e,r,i,n=c.limit-c.cursor;if(c.ket=c.cursor,c.eq_s_b(2,"st")&&(c.bra=c.cursor,c.eq_s_b(2,"ig")&&c.slice_del()),c.cursor=c.limit-n,c.cursor>=t&&(r=c.limit_backward,c.limit_backward=t,c.ket=c.cursor,e=c.find_among_b(a,5),c.limit_backward=r,e))switch(c.bra=c.cursor,e){case 1:c.slice_del(),i=c.limit-c.cursor,l(),c.cursor=c.limit-i;break;case 2:c.slice_from("løs")}}(),c.cursor=c.limit,c.cursor>=t&&(e=c.limit_backward,c.limit_backward=t,c.ket=c.cursor,c.out_grouping_b(d,97,248)?(c.bra=c.cursor,n=c.slice_to(n),c.limit_backward=e,c.eq_v_b(n)&&c.slice_del()):c.limit_backward=e),!0}},function(e){return"function"==typeof e.update?e.update(function(e){return i.setCurrent(e),i.stem(),i.getCurrent()}):(i.setCurrent(e),i.stem(),i.getCurrent())}),e.Pipeline.registerFunction(e.da.stemmer,"stemmer-da"),e.da.stopWordFilter=e.generateStopWordFilter("ad af alle alt anden at blev blive bliver da de dem den denne der deres det dette dig din disse dog du efter eller en end er et for fra ham han hans har havde have hende hendes her hos hun hvad hvis hvor i ikke ind jeg jer jo kunne man mange med meget men mig min mine mit mod ned noget nogle nu når og også om op os over på selv sig sin sine sit skal skulle som sådan thi til ud under var vi vil ville vor være været".split(" ")),e.Pipeline.registerFunction(e.da.stopWordFilter,"stopWordFilter-da")}});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(n){if(void 0===n)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===n.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var i="2"==n.version[0];n.jp=function(){this.pipeline.reset(),this.pipeline.add(n.jp.stopWordFilter,n.jp.stemmer),i?this.tokenizer=n.jp.tokenizer:(n.tokenizer&&(n.tokenizer=n.jp.tokenizer),this.tokenizerFn&&(this.tokenizerFn=n.jp.tokenizer))};var o=new n.TinySegmenter;n.jp.tokenizer=function(e){if(!arguments.length||null==e||null==e)return[];if(Array.isArray(e))return e.map(function(e){return i?new n.Token(e.toLowerCase()):e.toLowerCase()});for(var r=e.toString().toLowerCase().replace(/^\s+/,""),t=r.length-1;0<=t;t--)if(/\S/.test(r.charAt(t))){r=r.substring(0,t+1);break}return o.segment(r).filter(function(e){return!!e}).map(function(e){return i?new n.Token(e):e})},n.jp.stemmer=function(e){return e},n.Pipeline.registerFunction(n.jp.stemmer,"stemmer-jp"),n.jp.wordCharacters="一二三四五六七八九十百千万億兆一-龠々〆ヵヶぁ-んァ-ヴーア-ン゙a-zA-Z--0-9-",n.jp.stopWordFilter=function(e){if(-1===n.jp.stopWordFilter.stopWords.indexOf(i?e.toString():e))return e},n.jp.stopWordFilter=n.generateStopWordFilter("これ それ あれ この その あの ここ そこ あそこ こちら どこ だれ なに なん 何 私 貴方 貴方方 我々 私達 あの人 あのかた 彼女 彼 です あります おります います は が の に を で え から まで より も どの と し それで しかし".split(" ")),n.Pipeline.registerFunction(n.jp.stopWordFilter,"stopWordFilter-jp")}});

View File

@ -0,0 +1 @@
!function(e,i){"function"==typeof define&&define.amd?define(i):"object"==typeof exports?module.exports=i():i()(e.lunr)}(this,function(){return function(o){o.multiLanguage=function(){for(var e=Array.prototype.slice.call(arguments),i=e.join("-"),t="",r=[],n=[],s=0;s<e.length;++s)"en"==e[s]?(t+="\\w",r.unshift(o.stopWordFilter),r.push(o.stemmer),n.push(o.stemmer)):(t+=o[e[s]].wordCharacters,r.unshift(o[e[s]].stopWordFilter),r.push(o[e[s]].stemmer),n.push(o[e[s]].stemmer));var p=o.trimmerSupport.generateTrimmer(t);return o.Pipeline.registerFunction(p,"lunr-multi-trimmer-"+i),r.unshift(p),function(){this.pipeline.reset(),this.pipeline.add.apply(this.pipeline,r),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add.apply(this.searchPipeline,n))}}}});

View File

@ -0,0 +1 @@
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,n,i;e.no=function(){this.pipeline.reset(),this.pipeline.add(e.no.trimmer,e.no.stopWordFilter,e.no.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.no.stemmer))},e.no.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA--",e.no.trimmer=e.trimmerSupport.generateTrimmer(e.no.wordCharacters),e.Pipeline.registerFunction(e.no.trimmer,"trimmer-no"),e.no.stemmer=(r=e.stemmerSupport.Among,n=e.stemmerSupport.SnowballProgram,i=new function(){var o,s,a=[new r("a",-1,1),new r("e",-1,1),new r("ede",1,1),new r("ande",1,1),new r("ende",1,1),new r("ane",1,1),new r("ene",1,1),new r("hetene",6,1),new r("erte",1,3),new r("en",-1,1),new r("heten",9,1),new r("ar",-1,1),new r("er",-1,1),new r("heter",12,1),new r("s",-1,2),new r("as",14,1),new r("es",14,1),new r("edes",16,1),new r("endes",16,1),new r("enes",16,1),new r("hetenes",19,1),new r("ens",14,1),new r("hetens",21,1),new r("ers",14,1),new r("ets",14,1),new r("et",-1,1),new r("het",25,1),new r("ert",-1,3),new r("ast",-1,1)],m=[new r("dt",-1,-1),new r("vt",-1,-1)],l=[new r("leg",-1,1),new r("eleg",0,1),new r("ig",-1,1),new r("eig",2,1),new r("lig",2,1),new r("elig",4,1),new r("els",-1,1),new r("lov",-1,1),new r("elov",7,1),new r("slov",7,1),new r("hetslov",9,1)],u=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],d=[119,125,149,1],c=new n;this.setCurrent=function(e){c.setCurrent(e)},this.getCurrent=function(){return c.getCurrent()},this.stem=function(){var e,r,n,i,t=c.cursor;return function(){var e,r=c.cursor+3;if(s=c.limit,0<=r||r<=c.limit){for(o=r;;){if(e=c.cursor,c.in_grouping(u,97,248)){c.cursor=e;break}if(e>=c.limit)return;c.cursor=e+1}for(;!c.out_grouping(u,97,248);){if(c.cursor>=c.limit)return;c.cursor++}(s=c.cursor)<o&&(s=o)}}(),c.limit_backward=t,c.cursor=c.limit,function(){var e,r,n;if(c.cursor>=s&&(r=c.limit_backward,c.limit_backward=s,c.ket=c.cursor,e=c.find_among_b(a,29),c.limit_backward=r,e))switch(c.bra=c.cursor,e){case 1:c.slice_del();break;case 2:n=c.limit-c.cursor,c.in_grouping_b(d,98,122)?c.slice_del():(c.cursor=c.limit-n,c.eq_s_b(1,"k")&&c.out_grouping_b(u,97,248)&&c.slice_del());break;case 3:c.slice_from("er")}}(),c.cursor=c.limit,r=c.limit-c.cursor,c.cursor>=s&&(e=c.limit_backward,c.limit_backward=s,c.ket=c.cursor,c.find_among_b(m,2)?(c.bra=c.cursor,c.limit_backward=e,c.cursor=c.limit-r,c.cursor>c.limit_backward&&(c.cursor--,c.bra=c.cursor,c.slice_del())):c.limit_backward=e),c.cursor=c.limit,c.cursor>=s&&(i=c.limit_backward,c.limit_backward=s,c.ket=c.cursor,(n=c.find_among_b(l,11))?(c.bra=c.cursor,c.limit_backward=i,1==n&&c.slice_del()):c.limit_backward=i),!0}},function(e){return"function"==typeof e.update?e.update(function(e){return i.setCurrent(e),i.stem(),i.getCurrent()}):(i.setCurrent(e),i.stem(),i.getCurrent())}),e.Pipeline.registerFunction(e.no.stemmer,"stemmer-no"),e.no.stopWordFilter=e.generateStopWordFilter("alle at av bare begge ble blei bli blir blitt både båe da de deg dei deim deira deires dem den denne der dere deres det dette di din disse ditt du dykk dykkar då eg ein eit eitt eller elles en enn er et ett etter for fordi fra før ha hadde han hans har hennar henne hennes her hjå ho hoe honom hoss hossen hun hva hvem hver hvilke hvilken hvis hvor hvordan hvorfor i ikke ikkje ikkje ingen ingi inkje inn inni ja jeg kan kom korleis korso kun kunne kva kvar kvarhelst kven kvi kvifor man mange me med medan meg meget mellom men mi min mine mitt mot mykje ned no noe noen noka noko nokon nokor nokre nå når og også om opp oss over på samme seg selv si si sia sidan siden sin sine sitt sjøl skal skulle slik so som som somme somt så sånn til um upp ut uten var vart varte ved vere verte vi vil ville vore vors vort vår være være vært å".split(" ")),e.Pipeline.registerFunction(e.no.stopWordFilter,"stopWordFilter-no")}});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
!function(r,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():t()(r.lunr)}(this,function(){return function(r){r.stemmerSupport={Among:function(r,t,i,s){if(this.toCharArray=function(r){for(var t=r.length,i=new Array(t),s=0;s<t;s++)i[s]=r.charCodeAt(s);return i},!r&&""!=r||!t&&0!=t||!i)throw"Bad Among initialisation: s:"+r+", substring_i: "+t+", result: "+i;this.s_size=r.length,this.s=this.toCharArray(r),this.substring_i=t,this.result=i,this.method=s},SnowballProgram:function(){var b;return{bra:0,ket:0,limit:0,cursor:0,limit_backward:0,setCurrent:function(r){b=r,this.cursor=0,this.limit=r.length,this.limit_backward=0,this.bra=this.cursor,this.ket=this.limit},getCurrent:function(){var r=b;return b=null,r},in_grouping:function(r,t,i){if(this.cursor<this.limit){var s=b.charCodeAt(this.cursor);if(s<=i&&t<=s&&r[(s-=t)>>3]&1<<(7&s))return this.cursor++,!0}return!1},in_grouping_b:function(r,t,i){if(this.cursor>this.limit_backward){var s=b.charCodeAt(this.cursor-1);if(s<=i&&t<=s&&r[(s-=t)>>3]&1<<(7&s))return this.cursor--,!0}return!1},out_grouping:function(r,t,i){if(this.cursor<this.limit){var s=b.charCodeAt(this.cursor);if(i<s||s<t)return this.cursor++,!0;if(!(r[(s-=t)>>3]&1<<(7&s)))return this.cursor++,!0}return!1},out_grouping_b:function(r,t,i){if(this.cursor>this.limit_backward){var s=b.charCodeAt(this.cursor-1);if(i<s||s<t)return this.cursor--,!0;if(!(r[(s-=t)>>3]&1<<(7&s)))return this.cursor--,!0}return!1},eq_s:function(r,t){if(this.limit-this.cursor<r)return!1;for(var i=0;i<r;i++)if(b.charCodeAt(this.cursor+i)!=t.charCodeAt(i))return!1;return this.cursor+=r,!0},eq_s_b:function(r,t){if(this.cursor-this.limit_backward<r)return!1;for(var i=0;i<r;i++)if(b.charCodeAt(this.cursor-r+i)!=t.charCodeAt(i))return!1;return this.cursor-=r,!0},find_among:function(r,t){for(var i=0,s=t,e=this.cursor,n=this.limit,u=0,o=0,h=!1;;){for(var c=i+(s-i>>1),a=0,f=u<o?u:o,l=r[c],_=f;_<l.s_size;_++){if(e+f==n){a=-1;break}if(a=b.charCodeAt(e+f)-l.s[_])break;f++}if(a<0?(s=c,o=f):(i=c,u=f),s-i<=1){if(0<i||s==i||h)break;h=!0}}for(;;){if(u>=(l=r[i]).s_size){if(this.cursor=e+l.s_size,!l.method)return l.result;var m=l.method();if(this.cursor=e+l.s_size,m)return l.result}if((i=l.substring_i)<0)return 0}},find_among_b:function(r,t){for(var i=0,s=t,e=this.cursor,n=this.limit_backward,u=0,o=0,h=!1;;){for(var c=i+(s-i>>1),a=0,f=u<o?u:o,l=(_=r[c]).s_size-1-f;0<=l;l--){if(e-f==n){a=-1;break}if(a=b.charCodeAt(e-1-f)-_.s[l])break;f++}if(a<0?(s=c,o=f):(i=c,u=f),s-i<=1){if(0<i||s==i||h)break;h=!0}}for(;;){var _;if(u>=(_=r[i]).s_size){if(this.cursor=e-_.s_size,!_.method)return _.result;var m=_.method();if(this.cursor=e-_.s_size,m)return _.result}if((i=_.substring_i)<0)return 0}},replace_s:function(r,t,i){var s=i.length-(t-r);return b=b.substring(0,r)+i+b.substring(t),this.limit+=s,this.cursor>=t?this.cursor+=s:this.cursor>r&&(this.cursor=r),s},slice_check:function(){if(this.bra<0||this.bra>this.ket||this.ket>this.limit||this.limit>b.length)throw"faulty slice operation"},slice_from:function(r){this.slice_check(),this.replace_s(this.bra,this.ket,r)},slice_del:function(){this.slice_from("")},insert:function(r,t,i){var s=this.replace_s(r,t,i);r<=this.bra&&(this.bra+=s),r<=this.ket&&(this.ket+=s)},slice_to:function(){return this.slice_check(),b.substring(this.bra,this.ket)},eq_v_b:function(r){return this.eq_s_b(r.length,r)}}}},r.trimmerSupport={generateTrimmer:function(r){var t=new RegExp("^[^"+r+"]+"),i=new RegExp("[^"+r+"]+$");return function(r){return"function"==typeof r.update?r.update(function(r){return r.replace(t,"").replace(i,"")}):r.replace(t,"").replace(i,"")}}}}});

View File

@ -0,0 +1 @@
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r,l,n;e.sv=function(){this.pipeline.reset(),this.pipeline.add(e.sv.trimmer,e.sv.stopWordFilter,e.sv.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.sv.stemmer))},e.sv.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA--",e.sv.trimmer=e.trimmerSupport.generateTrimmer(e.sv.wordCharacters),e.Pipeline.registerFunction(e.sv.trimmer,"trimmer-sv"),e.sv.stemmer=(r=e.stemmerSupport.Among,l=e.stemmerSupport.SnowballProgram,n=new function(){var n,t,i=[new r("a",-1,1),new r("arna",0,1),new r("erna",0,1),new r("heterna",2,1),new r("orna",0,1),new r("ad",-1,1),new r("e",-1,1),new r("ade",6,1),new r("ande",6,1),new r("arne",6,1),new r("are",6,1),new r("aste",6,1),new r("en",-1,1),new r("anden",12,1),new r("aren",12,1),new r("heten",12,1),new r("ern",-1,1),new r("ar",-1,1),new r("er",-1,1),new r("heter",18,1),new r("or",-1,1),new r("s",-1,2),new r("as",21,1),new r("arnas",22,1),new r("ernas",22,1),new r("ornas",22,1),new r("es",21,1),new r("ades",26,1),new r("andes",26,1),new r("ens",21,1),new r("arens",29,1),new r("hetens",29,1),new r("erns",21,1),new r("at",-1,1),new r("andet",-1,1),new r("het",-1,1),new r("ast",-1,1)],s=[new r("dd",-1,-1),new r("gd",-1,-1),new r("nn",-1,-1),new r("dt",-1,-1),new r("gt",-1,-1),new r("kt",-1,-1),new r("tt",-1,-1)],a=[new r("ig",-1,1),new r("lig",0,1),new r("els",-1,1),new r("fullt",-1,3),new r("löst",-1,2)],o=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,24,0,32],u=[119,127,149],m=new l;this.setCurrent=function(e){m.setCurrent(e)},this.getCurrent=function(){return m.getCurrent()},this.stem=function(){var e,r=m.cursor;return function(){var e,r=m.cursor+3;if(t=m.limit,0<=r||r<=m.limit){for(n=r;;){if(e=m.cursor,m.in_grouping(o,97,246)){m.cursor=e;break}if(m.cursor=e,m.cursor>=m.limit)return;m.cursor++}for(;!m.out_grouping(o,97,246);){if(m.cursor>=m.limit)return;m.cursor++}(t=m.cursor)<n&&(t=n)}}(),m.limit_backward=r,m.cursor=m.limit,function(){var e,r=m.limit_backward;if(m.cursor>=t&&(m.limit_backward=t,m.cursor=m.limit,m.ket=m.cursor,e=m.find_among_b(i,37),m.limit_backward=r,e))switch(m.bra=m.cursor,e){case 1:m.slice_del();break;case 2:m.in_grouping_b(u,98,121)&&m.slice_del()}}(),m.cursor=m.limit,e=m.limit_backward,m.cursor>=t&&(m.limit_backward=t,m.cursor=m.limit,m.find_among_b(s,7)&&(m.cursor=m.limit,m.ket=m.cursor,m.cursor>m.limit_backward&&(m.bra=--m.cursor,m.slice_del())),m.limit_backward=e),m.cursor=m.limit,function(){var e,r;if(m.cursor>=t){if(r=m.limit_backward,m.limit_backward=t,m.cursor=m.limit,m.ket=m.cursor,e=m.find_among_b(a,5))switch(m.bra=m.cursor,e){case 1:m.slice_del();break;case 2:m.slice_from("lös");break;case 3:m.slice_from("full")}m.limit_backward=r}}(),!0}},function(e){return"function"==typeof e.update?e.update(function(e){return n.setCurrent(e),n.stem(),n.getCurrent()}):(n.setCurrent(e),n.stem(),n.getCurrent())}),e.Pipeline.registerFunction(e.sv.stemmer,"stemmer-sv"),e.sv.stopWordFilter=e.generateStopWordFilter("alla allt att av blev bli blir blivit de dem den denna deras dess dessa det detta dig din dina ditt du där då efter ej eller en er era ert ett från för ha hade han hans har henne hennes hon honom hur här i icke ingen inom inte jag ju kan kunde man med mellan men mig min mina mitt mot mycket ni nu när någon något några och om oss på samma sedan sig sin sina sitta själv skulle som så sådan sådana sådant till under upp ut utan vad var vara varför varit varje vars vart vem vi vid vilka vilkas vilken vilket vår våra vårt än är åt över".split(" ")),e.Pipeline.registerFunction(e.sv.stopWordFilter,"stopWordFilter-sv")}});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

251
custom_theme/base.html Normal file
View File

@ -0,0 +1,251 @@
{% import "partials/language.html" as lang with context %}
{% set feature = config.theme.feature %}
{% set palette = config.theme.palette %}
{% set font = config.theme.font %}
<!DOCTYPE html>
<html lang="{{ lang.t('language') }}" class="no-js">
<head>
{% block site_meta %}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
{% if page and page.meta and page.meta.description %}
<meta name="description" content="{{ page.meta.description }}">
{% elif config.site_description %}
<meta name="description" content="{{ config.site_description }}">
{% endif %}
{% if page.canonical_url %}
<link rel="canonical" href="{{ page.canonical_url }}">
{% endif %}
{% if page and page.meta and page.meta.author %}
<meta name="author" content="{{ page.meta.author | first }}">
{% elif config.site_author %}
<meta name="author" content="{{ config.site_author }}">
{% endif %}
{% for key in [
"clipboard.copy",
"clipboard.copied",
"search.language",
"search.pipeline.stopwords",
"search.pipeline.trimmer",
"search.result.none",
"search.result.one",
"search.result.other",
"search.tokenizer"
] %}
<meta name="lang:{{ key }}" content="{{ lang.t(key) }}">
{% endfor %}
<link rel="shortcut icon" href="{{ config.theme.favicon | url }}">
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-3.0.3">
{% endblock %}
{% block htmltitle %}
{% if page and page.meta and page.meta.title %}
<title>{{ page.meta.title }}</title>
{% elif page and page.title and not page.is_homepage %}
<title>{{ page.title }} - {{ config.site_name }}</title>
{% else %}
<title>{{ config.site_name }}</title>
{% endif %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/application.451f80e5.css' | url }}">
{% if palette.primary or palette.accent %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/application-palette.22915126.css' | url }}">
{% endif %}
{% if palette.primary %}
{% import "partials/palette.html" as map %}
{% set primary = map.primary(
palette.primary | replace(" ", "-") | lower
) %}
<meta name="theme-color" content="{{ primary }}">
{% endif %}
{% endblock %}
{% block libs %}
<script src="{{ 'assets/javascripts/modernizr.1aa3b519.js' | url }}"></script>
{% endblock %}
{% block fonts %}
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
{% if font != false %}
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family={{
font.text | replace(' ', '+') + ':300,400,400i,700|' +
font.code | replace(' ', '+')
}}">
<style>body,input{font-family:"{{ font.text }}","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"{{ font.code }}","Courier New",Courier,monospace}</style>
{% endif %}
{% endblock %}
<link rel="stylesheet" href="{{ 'assets/fonts/material-icons.css' | url }}">
{% for path in config["extra_css"] %}
<link rel="stylesheet" href="{{ path | url }}">
{% endfor %}
{% block extrahead %}{% endblock %}
<link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css">
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=default"></script>
</head>
{% if palette.primary or palette.accent %}
{% set primary = palette.primary | replace(" ", "-") | lower %}
{% set accent = palette.accent | replace(" ", "-") | lower %}
<body dir="{{ lang.t('direction') }}" data-md-color-primary="{{ primary }}" data-md-color-accent="{{ accent }}">
{% else %}
<body dir="{{ lang.t('direction') }}">
{% endif %}
<svg class="md-svg">
<defs>
{% set platform = config.extra.repo_icon or config.repo_url %}
{% if "github" in platform %}
{% include "assets/images/icons/github.f0b8504a.svg" %}
{% elif "gitlab" in platform %}
{% include "assets/images/icons/gitlab.6dd19c00.svg" %}
{% elif "bitbucket" in platform %}
{% include "assets/images/icons/bitbucket.1b09e088.svg" %}
{% endif %}
</defs>
</svg>
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
{% if page.toc | first is defined %}
<a href="{{ (page.toc | first).url | url }}" tabindex="1" class="md-skip">
{{ lang.t('skip.link.title') }}
</a>
{% endif %}
{% block header %}
{% include "partials/header.html" %}
{% endblock %}
<div class="md-container">
{% block hero %}
{% if page and page.meta and page.meta.hero %}
{% include "partials/hero.html" with context %}
{% endif %}
{% endblock %}
{% if feature.tabs %}
{% include "partials/tabs.html" %}
{% endif %}
<main class="md-main">
<div class="md-main__inner md-grid" data-md-component="container">
{% block site_nav %}
{% if nav %}
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
{% include "partials/nav.html" %}
</div>
</div>
</div>
{% endif %}
{% if page.toc %}
<div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
{% include "partials/toc.html" %}
</div>
</div>
</div>
{% endif %}
{% endblock %}
<div class="md-content">
<article class="md-content__inner md-typeset">
{% block content %}
{% if page.edit_url %}
<a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-icon md-content__icon">&#xE3C9;</a>
{% endif %}
{% if not "\x3ch1" in page.content %}
<h1>{{ page.title | default(config.site_name, true)}}</h1>
{% endif %}
{{ page.content }}
{% block source %}
{% if page and page.meta and page.meta.source %}
<h2 id="__source">{{ lang.t("meta.source") }}</h2>
{% set repo = config.repo_url %}
{% if repo | last == "/" %}
{% set repo = repo[:-1] %}
{% endif %}
{% set path = page.meta.path | default([""]) %}
{% set file = page.meta.source %}
<a href="{{ [repo, path, file] | join('/') }}" title="{{ file }}" class="md-source-file">
{{ file }}
</a>
{% endif %}
{% endblock %}
{% endblock %}
{% block disqus %}
{% include "partials/integrations/disqus.html" %}
{% endblock %}
<hr/>
<div align="center">
<p><a href="http://www.apachecn.org/" target="_blank"><font face="KaiTi" size="6" color="red">我们一直在努力</font></a><p>
<p><a href="https://github.com/apachecn/spring-boot-doc-zh/" target="_blank">apachecn/spring-boot-doc-zh</a></p>
<p><iframe align="middle" src="https://ghbtns.com/github-btn.html?user=apachecn&repo=spring-boot-doc-zh&type=watch&count=true&v=2" frameborder="0" scrolling="0" width="100px" height="25px"></iframe>
<iframe align="middle" src="https://ghbtns.com/github-btn.html?user=apachecn&repo=spring-boot-doc-zh&type=star&count=true" frameborder="0" scrolling="0" width="100px" height="25px"></iframe>
<iframe align="middle" src="https://ghbtns.com/github-btn.html?user=apachecn&repo=spring-boot-doc-zh&type=fork&count=true" frameborder="0" scrolling="0" width="100px" height="25px"></iframe>
<a target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=bcee938030cc9e1552deb3bd9617bbbf62d3ec1647e4b60d9cd6b6e8f78ddc03"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="ML | ApacheCN" title="ML | ApacheCN"></a></p>
<div style="text-align:center;margin:0 0 10.5px;"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-3565452474788507"
data-ad-slot="2543897000"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></div>
</div>
<script src="https://unpkg.com/gitalk/dist/gitalk.min.js"></script>
<script src="https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.min.js"></script>
<div id="gitalk-container" class="container-fluid"></div>
<script type="text/javascript">
var gitalk = new Gitalk({
clientID: 'f27b87eb424ba43df978',
clientSecret: '9b3482a495c5257a1d269d8108b9bfd71f048c3c',
repo: 'spring-boot-doc-zh',
owner: 'apachecn',
admin: ['jiangzhonglian'],
id: md5(location.pathname),
distractionFreeMode: false
})
gitalk.render('gitalk-container')
</script>
</article>
</div>
</div>
</main>
{% block footer %}
{% include "partials/footer.html" %}
{% endblock %}
</div>
{% block scripts %}
<script src="{{ 'assets/javascripts/application.583bbe55.js' | url }}"></script>
{% if lang.t("search.language") != "en" %}
{% set languages = lang.t("search.language").split(",") %}
{% if languages | length and languages[0] != "" %}
{% set path = "assets/javascripts/lunr/" %}
<script src="{{ (path ~ 'lunr.stemmer.support.js') | url }}"></script>
{% for language in languages | map("trim") %}
{% if language != "en" %}
{% if language == "jp" %}
<script src="{{ (path ~ 'tinyseg.js') | url }}"></script>
{% endif %}
{% if language in ("da", "de", "du", "es", "fi", "fr", "hu", "it", "jp", "no", "pt", "ro", "ru", "sv", "tr") %}
<script src="{{ (path ~ 'lunr.' ~ language ~ '.js') | url }}"></script>
{% endif %}
{% endif %}
{% endfor %}
{% if languages | length > 1 %}
<script src="{{ (path ~ 'lunr.multi.js') | url }}"></script>
{% endif %}
{% endif %}
{% endif %}
<script>app.initialize({version:"{{ mkdocs_version }}",url:{base:"{{ base_url }}"}})</script>
{% for path in config["extra_javascript"] %}
<script src="{{ path | url }}"></script>
{% endfor %}
{% endblock %}
{% block analytics %}
{% if config.google_analytics %}
{% include "partials/integrations/analytics.html" %}
{% endif %}
{% endblock %}
</body>
</html>

1
custom_theme/main.html Normal file
View File

@ -0,0 +1 @@
{% extends "base.html" %}

View File

@ -0,0 +1,73 @@
# Copyright (c) 2016-2018 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Language for theme localization
language: en
# Text direction (can be ltr or rtl), default: ltr
direction:
# Feature flags for functionality that alters behavior significantly, and thus
# may be a matter of taste
feature:
# Another layer on top of the main navigation for larger screens in the form
# of tabs, especially useful for larger documentation projects
tabs: false
# Sets the primary and accent color palettes as defined in the Material Design
# documentation - possible values can be looked up in the getting started guide
palette:
# Primary color used for header, sidebar and links, default: indigo
primary:
# Accent color for highlighting user interaction, default: indigo
accent:
# Fonts used by Material, automatically loaded from Google Fonts - see the site
# for a list of available fonts
font:
# Default font for text
text: Roboto
# Fixed-width font for code listings
code: Roboto Mono
# Favicon to be rendered
favicon: assets/images/favicon.png
# The logo of the documentation shown in the header and navigation can either
# be a Material Icon ligature (see https://material.io/icons/) or an image URL
logo:
icon: "\uE80C"
# Material includes the search in the header as a partial, not as a separate
# template, so it's correct that search.html is missing
include_search_page: false
# Material doesn't use MkDocs search functionality but provides its own. For
# this reason, only the search index needs to be built
search_index_only: true
# Static pages to build
static_templates:
- 404.html

View File

@ -0,0 +1,58 @@
{% import "partials/language.html" as lang with context %}
<footer class="md-footer">
{% if page.previous_page or page.next_page %}
<div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid">
{% if page.previous_page %}
<a href="{{ page.previous_page.url | url }}" title="{{ page.previous_page.title }}" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
</div>
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
{{ lang.t("footer.previous") }}
</span>
{{ page.previous_page.title }}
</span>
</div>
</a>
{% endif %}
{% if page.next_page %}
<a href="{{ page.next_page.url | url }}" title="{{ page.next_page.title }}" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
{{ lang.t("footer.next") }}
</span>
{{ page.next_page.title }}
</span>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
</div>
</a>
{% endif %}
</nav>
</div>
{% endif %}
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
{% if config.copyright %}
<div class="md-footer-copyright__highlight">
{{ config.copyright }}
</div>
{% endif %}
powered by
<a href="https://www.mkdocs.org">MkDocs</a>
and
<a href="https://squidfunk.github.io/mkdocs-material/">
Material for MkDocs</a>
</div>
{% block social %}
{% include "partials/social.html" %}
{% endblock %}
</div>
</div>
</footer>

View File

@ -0,0 +1,49 @@
<header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid">
<div class="md-flex">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name }}" class="md-header-nav__button md-logo">
{% if config.theme.logo.icon %}
<i class="md-icon">{{ config.theme.logo.icon }}</i>
{% else %}
<img src="{{ config.theme.logo | url }}" width="24" height="24">
{% endif %}
</a>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
{% block site_name %}
{% if config.site_name == page.title %}
{{ config.site_name }}
{% else %}
<span class="md-header-nav__topic">
{{ config.site_name }}
</span>
<span class="md-header-nav__topic">
{{ page.title }}
</span>
{% endif %}
{% endblock %}
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
{% block search_box %}
{% if "search" in config["plugins"] %}
<label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
{% include "partials/search.html" %}
{% endif %}
{% endblock %}
</div>
{% if config.repo_url %}
<div class="md-flex__cell md-flex__cell--shrink">
<div class="md-header-nav__source">
{% include "partials/source.html" %}
</div>
</div>
{% endif %}
</div>
</nav>
</header>

View File

@ -0,0 +1,10 @@
{% set feature = config.theme.feature %}
{% set class = "md-hero" %}
{% if not feature.tabs %}
{% set class = "md-hero md-hero--expand" %}
{% endif %}
<div class="{{ class }}" data-md-component="hero">
<div class="md-hero__inner md-grid">
{{ page.meta.hero }}
</div>
</div>

View File

@ -0,0 +1 @@
<script>!function(e,a,t,n,o,c,i){e.GoogleAnalyticsObject=o,e.ga=e.ga||function(){(e.ga.q=e.ga.q||[]).push(arguments)},e.ga.l=1*new Date,c=a.createElement(t),i=a.getElementsByTagName(t)[0],c.async=1,c.src="https://www.google-analytics.com/analytics.js",i.parentNode.insertBefore(c,i)}(window,document,"script",0,"ga"),ga("create","{{ config.google_analytics[0] }}","{{ config.google_analytics[1] }}"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>

View File

@ -0,0 +1,21 @@
{% set disqus = config.extra.disqus %}
{% if page and page.meta and page.meta.disqus is string %}
{% set disqus = page.meta.disqus %}
{% endif %}
{% if not page.is_homepage and disqus %}
<h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = "{{ page.canonical_url }}";
this.page.identifier =
"{{ page.canonical_url | replace(config.site_url, "") }}";
};
(function() {
var d = document, s = d.createElement("script");
s.src = "//{{ disqus }}.disqus.com/embed.js";
s.setAttribute("data-timestamp", +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
{% endif %}

View File

@ -0,0 +1,11 @@
{% import "partials/language/" + config.theme.language + ".html" as lang %}
{% import "partials/language/en.html" as fallback %}
{% macro t(key) %}{{ {
"direction": config.theme.direction,
"search.language": (
config.extra.search | default({})
).language,
"search.tokenizer": (
config.extra.search | default({})
).tokenizer | default("", true),
}[key] or lang.t(key) or fallback.t(key) }}{% endmacro %}

View File

@ -0,0 +1,22 @@
{% macro t(key) %}{{ {
"language": "ar",
"direction": "rtl",
"clipboard.copy": "نسخ إلى الحافظة",
"clipboard.copied": "تم النسخ الى الحافظة",
"edit.link.title": "عدل الصفحة",
"footer.previous": "السابقة",
"footer.next": "التالية",
"meta.comments": "التعليقات",
"meta.source": "المصدر",
"search.language": "",
"search.pipeline.stopwords": false,
"search.pipeline.trimmer": false,
"search.placeholder": "بحث",
"search.result.placeholder": "اكتب لبدء البحث",
"search.result.none": "لا توجد نتائج",
"search.result.one": "نتائج البحث مستند واحد",
"search.result.other": "نتائج البحث # مستندات",
"skip.link.title": "انتقل إلى المحتوى",
"source.link.title": "اذهب إلى المصدر",
"toc.title": "جدول المحتويات"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "ca",
"clipboard.copy": "Còpia al porta-retalls",
"clipboard.copied": "Copiat al porta-retalls",
"edit.link.title": "Edita aquesta pàgina",
"footer.previous": "Anterior",
"footer.next": "Següent",
"meta.comments": "Comentaris",
"meta.source": "Codi font",
"search.language": "",
"search.placeholder": "Cerca",
"search.result.placeholder": "Escriu per a començar a cercar",
"search.result.none": "Cap document coincideix",
"search.result.one": "1 document coincident",
"search.result.other": "# documents coincidents",
"skip.link.title": "Salta el contingut",
"source.link.title": "Ves al repositori",
"toc.title": "Taula de continguts"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "cs",
"clipboard.copy": "Kopírovat do schránky",
"clipboard.copied": "Zkopírováno do schránky",
"edit.link.title": "Upravit tuto stránku",
"footer.previous": "Předchozí",
"footer.next": "Další",
"meta.comments": "Komentáře",
"meta.source": "Zdroj",
"search.language": "ro",
"search.placeholder": "Hledat",
"search.result.placeholder": "Pište co se má vyhledat",
"search.result.none": "Nenalezeny žádné dokumenty",
"search.result.one": "Nalezený dokument: 1",
"search.result.other": "Nalezené dokumenty: #",
"skip.link.title": "Přeskočit obsah",
"source.link.title": "Přejít do repozitáře",
"toc.title": "Obsah"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "da",
"clipboard.copy": "Kopiér til udklipsholderen",
"clipboard.copied": "Kopieret til udklipsholderen",
"edit.link.title": "Redigér denne side",
"footer.previous": "Forrige",
"footer.next": "Næste",
"meta.comments": "Kommentarer",
"meta.source": "Kilde",
"search.language": "da",
"search.placeholder": "Søg",
"search.result.placeholder": "Indtask søgeord",
"search.result.none": "Ingen resultater fundet",
"search.result.one": "1 resultat",
"search.result.other": "# resultater",
"skip.link.title": "Gå til indholdet",
"source.link.title": "Åbn arkiv",
"toc.title": "Indholdsfortegnelse"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "de",
"clipboard.copy": "In Zwischenablage kopieren",
"clipboard.copied": "In Zwischenablage kopiert",
"edit.link.title": "Seite editieren",
"footer.previous": "Zurück",
"footer.next": "Weiter",
"meta.comments": "Kommentare",
"meta.source": "Quellcode",
"search.language": "de",
"search.placeholder": "Suche",
"search.result.placeholder": "Suchbegriff eingeben",
"search.result.none": "Keine Suchergebnisse",
"search.result.one": "1 Suchergebnis",
"search.result.other": "# Suchergebnisse",
"skip.link.title": "Zum Inhalt",
"source.link.title": "Quellcode",
"toc.title": "Inhaltsverzeichnis"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,23 @@
{% macro t(key) %}{{ {
"language": "en",
"direction": "ltr",
"clipboard.copy": "Copy to clipboard",
"clipboard.copied": "Copied to clipboard",
"edit.link.title": "Edit this page",
"footer.previous": "Previous",
"footer.next": "Next",
"meta.comments": "Comments",
"meta.source": "Source",
"search.language": "en",
"search.pipeline.stopwords": true,
"search.pipeline.trimmer": true,
"search.placeholder": "Search",
"search.result.placeholder": "Type to start searching",
"search.result.none": "No matching documents",
"search.result.one": "1 matching document",
"search.result.other": "# matching documents",
"search.tokenizer": "[\s\-]+",
"skip.link.title": "Skip to content",
"source.link.title": "Go to repository",
"toc.title": "Table of contents"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "es",
"clipboard.copy": "Copiar al portapapeles",
"clipboard.copied": "Copiado al portapapeles",
"edit.link.title": "Editar esta página",
"footer.previous": "Anterior",
"footer.next": "Siguiente",
"meta.comments": "Comentarios",
"meta.source": "Fuente",
"search.language": "es",
"search.placeholder": "Búsqueda",
"search.result.placeholder": "Teclee para comenzar búsqueda",
"search.result.none": "No se encontraron documentos",
"search.result.one": "1 documento encontrado",
"search.result.other": "# documentos encontrados",
"skip.link.title": "Saltar a contenido",
"source.link.title": "Ir al repositorio",
"toc.title": "Tabla de contenidos"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,22 @@
{% macro t(key) %}{{ {
"language": "fa",
"direction": "rtl",
"clipboard.copy": "کپی کردن",
"clipboard.copied": "کپی شد",
"edit.link.title": "این صفحه را ویرایش کنید",
"footer.previous": "قبلی",
"footer.next": "بعدی",
"meta.comments": "نظرات",
"meta.source": "منبع",
"search.language": "",
"search.pipeline.stopwords": false,
"search.pipeline.trimmer": false,
"search.placeholder": "جستجو",
"search.result.placeholder": "برای شروع جستجو تایپ کنید",
"search.result.none": "سندی یافت نشد",
"search.result.one": "1 سند یافت شد",
"search.result.other": "# سند یافت شد",
"skip.link.title": "پرش به محتویات",
"source.link.title": "رفتن به مخزن",
"toc.title": "فهرست موضوعات"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "fi",
"clipboard.copy": "Kopioi leikepöydälle",
"clipboard.copied": "Kopioitu leikepöydälle",
"edit.link.title": "Muokkaa tätä sivua",
"footer.previous": "Edellinen",
"footer.next": "Seuraava",
"meta.comments": "Kommentit",
"meta.source": "Lähdekodi",
"search.language": "fi",
"search.placeholder": "Hae",
"search.result.placeholder": "Kirjoita aloittaaksesi haun",
"search.result.none": "Ei täsmääviä dokumentteja",
"search.result.one": "1 täsmäävä dokumentti",
"search.result.other": "# täsmäävää dokumenttia",
"skip.link.title": "Hyppää sisältöön",
"source.link.title": "Mene repositoryyn",
"toc.title": "Sisällysluettelo"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,18 @@
{% macro t(key) %}{{ {
"language": "fr",
"clipboard.copy": "Copier dans le presse-papier",
"clipboard.copied": "Copié dans le presse-papier",
"edit.link.title": "Editer cette page",
"footer.previous": "Précédent",
"footer.next": "Suivant",
"meta.comments": "Commentaires",
"meta.source": "Source",
"search.language": "fr",
"search.placeholder": "Rechercher",
"search.result.placeholder": "Taper pour démarrer la recherche",
"search.result.none": "Aucun document trouvé",
"search.result.one": "1 document trouvé",
"search.result.other": "# documents trouvés",
"source.link.title": "Aller au dépôt",
"toc.title": "Table des matières"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "gl",
"clipboard.copy": "Copiar no cortapapeis",
"clipboard.copied": "Copiado no cortapapeis",
"edit.link.title": "Editar esta páxina",
"footer.previous": "Anterior",
"footer.next": "Seguinte",
"meta.comments": "Comentarios",
"meta.source": "Fonte",
"search.language": "es",
"search.placeholder": "Busca",
"search.result.placeholder": "Insira un termo",
"search.result.none": "Sen resultados",
"search.result.one": "1 resultado atopado",
"search.result.other": "# resultados atopados",
"skip.link.title": "Ir ao contido",
"source.link.title": "Ir ao repositorio",
"toc.title": "Táboa de contidos"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,22 @@
{% macro t(key) %}{{ {
"language": "he",
"direction": "rtl",
"clipboard.copy": "העתק ללוח",
"clipboard.copied": "הועתק ללוח",
"edit.link.title": "ערוך דף זה",
"footer.previous": "קודם",
"footer.next": "הַבָּא",
"meta.comments": "הערות",
"meta.source": "מָקוֹר",
"search.language": "",
"search.pipeline.stopwords": false,
"search.pipeline.trimmer": false,
"search.placeholder": "לחפש",
"search.result.placeholder": "הקלד כדי להתחיל לחפש",
"search.result.none": "אין מסמכים תואמים",
"search.result.one": "1 מסמך תואם",
"search.result.other": "# מסמך תואם",
"skip.link.title": "דלג לתוכן",
"source.link.title": "עבור אל מאגר",
"toc.title": "תוכן העניינים"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,21 @@
{% macro t(key) %}{{ {
"language": "hi",
"clipboard.copy": "क्लिपबोर्ड पर कॉपी करें",
"clipboard.copied": "क्लिपबोर्ड पर कॉपी कर दिया गया",
"edit.link.title": "इस पृष्ठ को संपादित करें",
"footer.previous": "पिछला",
"footer.next": "आगामी",
"meta.comments": "टिप्पणियाँ",
"meta.source": "स्रोत",
"search.language": "",
"search.pipeline.stopwords": false,
"search.pipeline.trimmer": false,
"search.placeholder": "खोज",
"search.result.placeholder": "खोज शुरू करने के लिए टाइप करें",
"search.result.none": "कोई मिलान डॉक्यूमेंट नहीं",
"search.result.one": "1 मिलान डॉक्यूमेंट",
"search.result.other": "# मिलान डाक्यूमेंट्स",
"skip.link.title": "विषय पर बढ़ें",
"source.link.title": "रिपॉजिटरी पर जाएं",
"toc.title": "विषय - सूची"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,21 @@
{% macro t(key) %}{{ {
"language": "hr",
"clipboard.copy": "Kopirajte u međuspremnik",
"clipboard.copied": "Kopirano u međuspremnik",
"edit.link.title": "Uredi stranicu",
"footer.previous": "Prethodno",
"footer.next": "Sljedeće",
"meta.comments": "Komentari",
"meta.source": "Izvor",
"search.language": "",
"search.pipeline.stopwords": false,
"search.pipeline.trimmer": false,
"search.placeholder": "Pretraživanje",
"search.result.placeholder": "Unesite pojam pretraživanja",
"search.result.none": "Ništa nije pronađeno",
"search.result.one": "1 rezultat pretraživanja",
"search.result.other": "# rezultata pretraživanja",
"skip.link.title": "Preskočite na sadržaj",
"source.link.title": "Idite u repozitorij",
"toc.title": "Sadržaj"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "hu",
"clipboard.copy": "Másolás vágólapra",
"clipboard.copied": "Vágólapra másolva",
"edit.link.title": "Oldal szerkesztése",
"footer.previous": "Előző",
"footer.next": "Következő",
"meta.comments": "Hozzászólások",
"meta.source": "Forrás",
"search.language": "hu",
"search.placeholder": "Keresés",
"search.result.placeholder": "Kereséshez írj ide valamit",
"search.result.none": "Nincs találat",
"search.result.one": "1 egyező dokumentum",
"search.result.other": "# egyező dokumentum",
"skip.link.title": "Kihagyás",
"source.link.title": "Főoldalra ugrás",
"toc.title": "Tartalomjegyzék"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,21 @@
{% macro t(key) %}{{ {
"language": "id",
"clipboard.copy": "Salin ke memori",
"clipboard.copied": "Tersalin ke memori",
"edit.link.title": "Ubah halaman ini",
"footer.previous": "Sebelumnya",
"footer.next": "Selanjutnya",
"meta.comments": "Komentar",
"meta.source": "Sumber",
"search.language": "",
"search.pipeline.stopwords": false,
"search.pipeline.trimmer": false,
"search.placeholder": "Cari",
"search.result.placeholder": "Ketik untuk mulai pencarian",
"search.result.none": "Tidak ada dokumen yang sesuai",
"search.result.one": "1 dokumen ditemukan",
"search.result.other": "# dokumen ditemukan",
"skip.link.title": "Lewati ke isi",
"source.link.title": "Menuju repositori",
"toc.title": "Daftar isi"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "it",
"clipboard.copy": "Copia",
"clipboard.copied": "Copiato",
"edit.link.title": "Modifica",
"footer.previous": "Precedente",
"footer.next": "Prossimo",
"meta.comments": "Commenti",
"meta.source": "Sorgente",
"search.language": "it",
"search.placeholder": "Cerca",
"search.result.placeholder": "Scrivi per iniziare a cercare",
"search.result.none": "Nessun documento trovato",
"search.result.one": "1 documento trovato",
"search.result.other": "# documenti trovati",
"skip.link.title": "Vai al contenuto",
"source.link.title": "Apri repository",
"toc.title": "Indice"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "ja",
"clipboard.copy": "クリップボードへコピー",
"clipboard.copied": "コピーしました",
"edit.link.title": "編集",
"footer.previous": "前",
"footer.next": "次",
"meta.comments": "コメント",
"meta.source": "ソース",
"search.language": "jp",
"search.placeholder": "検索",
"search.result.placeholder": "検索キーワードを入力してください",
"search.result.none": "何も見つかりませんでした",
"search.result.one": "1件見つかりました",
"search.result.other": "#件見つかりました",
"search.tokenizer": "[\s\- 、。,.]+",
"source.link.title": "リポジトリへ",
"toc.title": "目次"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,18 @@
{% macro t(key) %}{{ {
"language": "kr",
"clipboard.copy": "클립보드로 복사",
"clipboard.copied": "클립보드에 복사됨",
"edit.link.title": "이 페이지를 편집",
"footer.previous": "이전",
"footer.next": "다음",
"meta.comments": "댓글",
"meta.source": "출처",
"search.language": "jp",
"search.placeholder": "검색",
"search.result.placeholder": "검색어를 입력하세요",
"search.result.none": "검색어와 일치하는 문서가 없습니다",
"search.result.one": "1개의 일치하는 문서",
"search.result.other": "#개의 일치하는 문서",
"source.link.title": "저장소로 이동",
"toc.title": "목차"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "nl",
"clipboard.copy": "Kopiëren naar klembord",
"clipboard.copied": "Gekopieerd naar klembord",
"edit.link.title": "Wijzig deze pagina",
"footer.previous": "Vorige",
"footer.next": "Volgende",
"meta.comments": "Reacties",
"meta.source": "Bron",
"search.language": "du",
"search.placeholder": "Zoeken",
"search.result.placeholder": "Typ om te beginnen met zoeken",
"search.result.none": "Geen overeenkomende documenten",
"search.result.one": "1 overeenkomende document",
"search.result.other": "# overeenkomende documenten",
"skip.link.title": "Ga naar inhoud",
"source.link.title": "Ga naar repository",
"toc.title": "Inhoudsopgave"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "no",
"clipboard.copy": "Kopier til utklippstavlen",
"clipboard.copied": "Kopiert til utklippstavlen",
"edit.link.title": "Rediger denne siden",
"footer.previous": "Forrige",
"footer.next": "Neste",
"meta.comments": "Kommentarer",
"meta.source": "Kilde",
"search.language": "no",
"search.placeholder": "Søk",
"search.result.placeholder": "Skriv søkeord",
"search.result.none": "Ingen treff",
"search.result.one": "1 treff",
"search.result.other": "# treff",
"skip.link.title": "Gå til innhold",
"source.link.title": "Gå til kilde",
"toc.title": "Innholdsfortegnelse"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,21 @@
{% macro t(key) %}{{ {
"language": "pl",
"clipboard.copy": "Kopiuj do schowka",
"clipboard.copied": "Skopiowane",
"edit.link.title": "Edytuj tę stronę",
"footer.previous": "Poprzednia strona",
"footer.next": "Następna strona",
"meta.comments": "Komentarze",
"meta.source": "Kod źródłowy",
"search.language": "",
"search.pipeline.stopwords": false,
"search.pipeline.trimmer": false,
"search.placeholder": "Szukaj",
"search.result.placeholder": "Zacznij pisać, aby szukać",
"search.result.none": "Brak wyników wyszukiwania",
"search.result.one": "Wyniki wyszukiwania: 1",
"search.result.other": "Wyniki wyszukiwania: #",
"skip.link.title": "Przejdź do treści",
"source.link.title": "Idź do repozytorium",
"toc.title": "Spis treści"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "pt",
"clipboard.copy": "Copiar para área de transferência",
"clipboard.copied": "Copiado para área de transferência",
"edit.link.title": "Editar esta página",
"footer.previous": "Anterior",
"footer.next": "Próximo",
"meta.comments": "Comentários",
"meta.source": "Fonte",
"search.language": "pt",
"search.placeholder": "Buscar",
"search.result.placeholder": "Digite para iniciar a busca",
"search.result.none": "Nenhum resultado encontrado",
"search.result.one": "1 resultado encontrado",
"search.result.other": "# resultados encontrados",
"skip.link.title": "Ir para o conteúdo",
"source.link.title": "Ir ao repositório",
"toc.title": "Índice"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "ru",
"clipboard.copy": "Копировать в буфер",
"clipboard.copied": "Скопировано в буфер",
"edit.link.title": "Редактировать страницу",
"footer.previous": "Назад",
"footer.next": "Вперед",
"meta.comments": "Комментарии",
"meta.source": "Исходный код",
"search.language": "ru",
"search.placeholder": "Поиск",
"search.result.placeholder": "Начните печатать для поиска",
"search.result.none": "Совпадений не найдено",
"search.result.one": "Найдено 1 совпадение",
"search.result.other": "Найдено # совпадений",
"skip.link.title": "Перейти к содержанию",
"source.link.title": "Перейти к репозиторию",
"toc.title": "Содержание"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "sh",
"clipboard.copy": "Kopiraj u klipbord",
"clipboard.copied": "Iskopirano u klipbord",
"edit.link.title": "Uredi stranicu",
"footer.previous": "Prethodno",
"footer.next": "Sledeće",
"meta.comments": "Komentari",
"meta.source": "Izvor",
"search.language": "ro",
"search.placeholder": "Pretraga",
"search.result.placeholder": "Unesite pojam pretrage",
"search.result.none": "Ništa nije pronađeno",
"search.result.one": "1 rezultat pretrage",
"search.result.other": "# rezultata pretrage",
"skip.link.title": "Idi na tekst",
"source.link.title": "Idi u repozitorijum",
"toc.title": "Sadržaj"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "sk",
"clipboard.copy": "Kopírovať do schránky",
"clipboard.copied": "Skopírované do schránky",
"edit.link.title": "Upraviť túto stránku",
"footer.previous": "Späť",
"footer.next": "Ďalej",
"meta.comments": "Komentáre",
"meta.source": "Zdroj",
"search.language": "sk",
"search.placeholder": "Hľadať",
"search.result.placeholder": "Pre vyhľadávanie začni písať",
"search.result.none": "Žiadne vyhovujúce dokumenty",
"search.result.one": "Vyhovujúci dokument: 1",
"search.result.other": "Vyhovujúce dokumenty: #",
"skip.link.title": "Preskočiť na obsah",
"source.link.title": "Zobraziť repozitár",
"toc.title": "Obsah"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,21 @@
{% macro t(key) %}{{ {
"language": "sr",
"clipboard.copy": "Копирај у клипборд",
"clipboard.copied": "Ископирано у клипборд",
"edit.link.title": "Уреди страницу",
"footer.previous": "Претходно",
"footer.next": "Следеће",
"meta.comments": "Коментари",
"meta.source": "Извор",
"search.language": "",
"search.pipeline.stopwords": false,
"search.pipeline.trimmer": false,
"search.placeholder": "Претрага",
"search.result.placeholder": "Унесите појам претраге",
"search.result.none": "Нису пронађени документи",
"search.result.one": "1 резултат претраге",
"search.result.other": "# резултата претраге",
"skip.link.title": "Иди на текст",
"source.link.title": "Иди у репозиторијум",
"toc.title": "Садржај"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "sv",
"clipboard.copy": "Kopiera till urklipp",
"clipboard.copied": "Kopierat till urklipp",
"edit.link.title": "Redigera sidan",
"footer.previous": "Föregående",
"footer.next": "Nästa",
"meta.comments": "Kommentarer",
"meta.source": "Källa",
"search.language": "sv",
"search.placeholder": "Sök",
"search.result.placeholder": "Skriv sökord",
"search.result.none": "Inga sökresultat",
"search.result.one": "1 sökresultat",
"search.result.other": "# sökresultat",
"skip.link.title": "Gå till innehållet",
"source.link.title": "Gå till datakatalog",
"toc.title": "Innehållsförteckning"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,18 @@
{% macro t(key) %}{{ {
"language": "tr",
"clipboard.copy": "Kopyala",
"clipboard.copied": "Kopyalandı",
"edit.link.title": "Düzenle",
"footer.previous": "Önceki",
"footer.next": "Sonraki",
"meta.comments": "Yorumlar",
"meta.source": "Kaynak",
"search.language": "tr",
"search.placeholder": "Ara",
"search.result.placeholder": "Aramaya başlamak için yazın",
"search.result.none": "Eşleşen doküman bulunamadı",
"search.result.one": "1 doküman bulundu",
"search.result.other": "# doküman bulundu",
"source.link.title": "Depoya git",
"toc.title": "İçindekiler"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,19 @@
{% macro t(key) %}{{ {
"language": "uk",
"clipboard.copy": "Скопіювати в буфер",
"clipboard.copied": "Скопійовано в буфер",
"edit.link.title": "Редагувати сторінку",
"footer.previous": "Назад",
"footer.next": "Вперед",
"meta.comments": "Коментарі",
"meta.source": "Вихідний код",
"search.language": "ru",
"search.placeholder": "Пошук",
"search.result.placeholder": "Розпочніть писати для пошуку",
"search.result.none": "Збігів не знайдено",
"search.result.one": "Знайдено 1 збіг",
"search.result.other": "Знайдено # збігів",
"skip.link.title": "Перейти до змісту",
"source.link.title": "Перейти до репозиторію",
"toc.title": "Зміст"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,18 @@
{% macro t(key) %}{{ {
"language": "vi",
"clipboard.copy": "Sao chép vào bộ nhớ",
"clipboard.copied": "Sao chép xong",
"edit.link.title": "Chỉnh sửa",
"footer.previous": "Trước",
"footer.next": "Sau",
"meta.comments": "Bình luận",
"meta.source": "Mã nguồn",
"search.placeholder": "Tìm kiếm",
"search.result.placeholder": "Nhập để bắt đầu tìm kiếm",
"search.result.none": "Không tìm thấy tài liệu liên quan",
"search.result.one": "1 tài liệu liên quan",
"search.result.other": "# tài liệu liên quan",
"skip.link.title": "Vào thẳng nội dung",
"source.link.title": "Đến kho lưu trữ mã nguồn",
"toc.title": "Mục lục"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,20 @@
{% macro t(key) %}{{ {
"language": "zh-Hant",
"clipboard.copy": "拷貝",
"clipboard.copied": "已拷貝",
"edit.link.title": "編輯此頁",
"footer.previous": "上一頁",
"footer.next": "下一頁",
"meta.comments": "評論",
"meta.source": "來源",
"search.language": "jp",
"search.placeholder": "搜尋",
"search.result.placeholder": "鍵入以開始檢索",
"search.result.none": "沒有找到符合條件的結果",
"search.result.one": "找到 1 个符合條件的結果",
"search.result.other": "# 個符合條件的結果",
"search.tokenizer": "[\\。]+",
"skip.link.title": "跳轉至",
"source.link.title": "前往 Github 倉庫",
"toc.title": "目錄"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,20 @@
{% macro t(key) %}{{ {
"language": "zh-Hant",
"clipboard.copy": "複製",
"clipboard.copied": "已複製",
"edit.link.title": "編輯此頁",
"footer.previous": "上一頁",
"footer.next": "下一頁",
"meta.comments": "留言",
"meta.source": "來源",
"search.language": "jp",
"search.placeholder": "搜尋",
"search.result.placeholder": "打字進行搜尋",
"search.result.none": "沒有符合的項目",
"search.result.one": "找到 1 個符合的項目",
"search.result.other": "找到 # 個符合的項目",
"search.tokenizer": "[\\。]+",
"skip.link.title": "跳轉到",
"source.link.title": "前往倉庫",
"toc.title": "本頁目錄"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,20 @@
{% macro t(key) %}{{ {
"language": "zh",
"clipboard.copy": "复制",
"clipboard.copied": "已复制",
"edit.link.title": "编辑此页",
"footer.previous": "后退",
"footer.next": "前进",
"meta.comments": "评论",
"meta.source": "来源",
"search.language": "jp",
"search.placeholder": "搜索",
"search.result.placeholder": "键入以开始搜索",
"search.result.none": "没有找到符合条件的结果",
"search.result.one": "找到 1 个符合条件的结果",
"search.result.other": "# 个符合条件的结果",
"search.tokenizer": "[\\。]+",
"skip.link.title": "跳转至",
"source.link.title": "前往 Github 仓库",
"toc.title": "目录"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,54 @@
{% set class = "md-nav__item" %}
{% if nav_item.active %}
{% set class = "md-nav__item md-nav__item--active" %}
{% endif %}
{% if nav_item.children %}
<li class="{{ class }} md-nav__item--nested">
{% if nav_item.active %}
<input class="md-toggle md-nav__toggle" data-md-toggle="{{ path }}" type="checkbox" id="{{ path }}" checked>
{% else %}
<input class="md-toggle md-nav__toggle" data-md-toggle="{{ path }}" type="checkbox" id="{{ path }}">
{% endif %}
<label class="md-nav__link" for="{{ path }}">
{{ nav_item.title }}
</label>
<nav class="md-nav" data-md-component="collapsible" data-md-level="{{ level }}">
<label class="md-nav__title" for="{{ path }}">
{{ nav_item.title }}
</label>
<ul class="md-nav__list" data-md-scrollfix>
{% set base = path %}
{% for nav_item in nav_item.children %}
{% set path = base + "-" + loop.index | string %}
{% set level = level + 1 %}
{% include "partials/nav-item.html" %}
{% endfor %}
</ul>
</nav>
</li>
{% elif nav_item == page %}
<li class="{{ class }}">
{% set toc_ = page.toc %}
<input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc">
{% if toc_ | first is defined and "\x3ch1 id=" in page.content %}
{% set toc_ = (toc_ | first).children %}
{% endif %}
{% if toc_ | first is defined %}
<label class="md-nav__link md-nav__link--active" for="__toc">
{{ nav_item.title }}
</label>
{% endif %}
<a href="{{ nav_item.url | url }}" title="{{ nav_item.title }}" class="md-nav__link md-nav__link--active">
{{ nav_item.title }}
</a>
{% if toc_ | first is defined %}
{% include "partials/toc.html" %}
{% endif %}
</li>
{% else %}
<li class="{{ class }}">
<a href="{{ nav_item.url | url }}" title="{{ nav_item.title }}" class="md-nav__link">
{{ nav_item.title }}
</a>
</li>
{% endif %}

View File

@ -0,0 +1,24 @@
<nav class="md-nav md-nav--primary" data-md-level="0">
<label class="md-nav__title md-nav__title--site" for="__drawer">
<a href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name }}" class="md-nav__button md-logo">
{% if config.theme.logo.icon %}
<i class="md-icon">{{ config.theme.logo.icon }}</i>
{% else %}
<img src="{{ config.theme.logo | url }}" width="48" height="48">
{% endif %}
</a>
{{ config.site_name }}
</label>
{% if config.repo_url %}
<div class="md-nav__source">
{% include "partials/source.html" %}
</div>
{% endif %}
<ul class="md-nav__list" data-md-scrollfix>
{% for nav_item in nav %}
{% set path = "nav-" + loop.index | string %}
{% set level = 1 %}
{% include "partials/nav-item.html" %}
{% endfor %}
</ul>
</nav>

View File

@ -0,0 +1,39 @@
{% macro primary(key) %}{{ {
"red": "#ef5350",
"pink": "#e91e63",
"purple": "#ab47bc",
"deep-purple": "#7e57c2",
"indigo": "#3f51b5",
"blue": "#2196f3",
"light-blue": "#03a9f4",
"cyan": "#00bcd4",
"teal": "#009688",
"green": "#4caf50",
"light-green": "#7cb342",
"lime": "#c0ca33",
"yellow": "#f9a825",
"amber": "#ffa000",
"orange": "#fb8c00",
"deep-orange": "#ff7043",
"brown": "#795548",
"grey": "#757575",
"blue-grey": "#546e7a"
}[key] }}{% endmacro %}
{% macro accent(key) %}{{ {
"red": "#ff1744",
"pink": "#f50057",
"purple": "#e040fb",
"deep-purple": "#7c4dff",
"indigo": "#536dfe",
"blue": "#448aff",
"light-blue": "#0091ea",
"cyan": "#00b8d4",
"teal": "#00bfa5",
"green": "#00c853",
"light-green": "#64dd17",
"lime": "#aeea00",
"yellow": "#ffd600",
"amber": "#ffab00",
"orange": "#ff9100",
"deep-orange": "#ff6e40"
}[key] }}{% endmacro %}

View File

@ -0,0 +1,23 @@
{% import "partials/language.html" as lang with context %}
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" placeholder="{{ lang.t('search.placeholder') }}" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
<button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
&#xE5CD;
</button>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="result">
<div class="md-search-result__meta">
{{ lang.t("search.result.placeholder") }}
</div>
<ol class="md-search-result__list"></ol>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,8 @@
{% if config.extra.social %}
<div class="md-footer-social">
<link rel="stylesheet" href="{{ 'assets/fonts/font-awesome.css' | url }}">
{% for social in config.extra.social %}
<a href="{{ social.link }}" class="md-footer-social__link fa fa-{{ social.type }}"></a>
{% endfor %}
</div>
{% endif %}

View File

@ -0,0 +1,25 @@
{% import "partials/language.html" as lang with context %}
{% set platform = config.extra.repo_icon or config.repo_url %}
{% if "github" in platform %}
{% set repo_type = "github" %}
{% elif "gitlab" in platform %}
{% set repo_type = "gitlab" %}
{% elif "bitbucket" in platform %}
{% set repo_type = "bitbucket" %}
{% else %}
{% set repo_type = "" %}
{% endif %}
{% block repo %}
<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}" class="md-source" data-md-source="{{ repo_type }}">
{% if repo_type %}
<div class="md-source__icon">
<svg viewBox="0 0 24 24" width="24" height="24">
<use xlink:href="#__{{ repo_type }}" width="24" height="24"></use>
</svg>
</div>
{% endif %}
<div class="md-source__repository">
{{ config.repo_name }}
</div>
</a>
{% endblock %}

View File

@ -0,0 +1,31 @@
{% if nav_item.is_homepage %}
<li class="md-tabs__item">
{% if not page.ancestors | length and nav | selectattr("url", page.url) %}
<a href="{{ nav_item.url | url }}" title="{{ nav_item.title }}" class="md-tabs__link md-tabs__link--active">
{{ nav_item.title }}
</a>
{% else %}
<a href="{{ nav_item.url | url }}" title="{{ nav_item.title }}" class="md-tabs__link">
{{ nav_item.title }}
</a>
{% endif %}
</li>
{% elif nav_item.children and nav_item.children | length > 0 %}
{% set title = title | default(nav_item.title) %}
{% if (nav_item.children | first).children %}
{% set nav_item = nav_item.children | first %}
{% include "partials/tabs-item.html" %}
{% else %}
<li class="md-tabs__item">
{% if nav_item.active %}
<a href="{{ (nav_item.children | first).url | url }}" title="{{ title }}" class="md-tabs__link md-tabs__link--active">
{{ title }}
</a>
{% else %}
<a href="{{ (nav_item.children | first).url | url }}" title="{{ title }}" class="md-tabs__link">
{{ title }}
</a>
{% endif %}
</li>
{% endif %}
{% endif %}

View File

@ -0,0 +1,13 @@
{% set class = "md-tabs" %}
{% if page.ancestors | length > 0 %}
{% set class = "md-tabs md-tabs--active" %}
{% endif %}
<nav class="{{ class }}" data-md-component="tabs">
<div class="md-tabs__inner md-grid">
<ul class="md-tabs__list">
{% for nav_item in nav %}
{% include "partials/tabs-item.html" %}
{% endfor %}
</ul>
</div>
</nav>

View File

@ -0,0 +1,14 @@
<li class="md-nav__item">
<a href="{{ toc_item.url }}" title="{{ toc_item.title }}" class="md-nav__link">
{{ toc_item.title }}
</a>
{% if toc_item.children %}
<nav class="md-nav">
<ul class="md-nav__list">
{% for toc_item in toc_item.children %}
{% include "partials/toc-item.html" %}
{% endfor %}
</ul>
</nav>
{% endif %}
</li>

View File

@ -0,0 +1,33 @@
{% import "partials/language.html" as lang with context %}
<nav class="md-nav md-nav--secondary">
{% set toc_ = page.toc %}
{% if toc_ | first is defined and "\x3ch1 id=" in page.content %}
{% set toc_ = (toc_ | first).children %}
{% endif %}
{% if toc_ | first is defined %}
<label class="md-nav__title" for="__toc">{{ lang.t("toc.title") }}</label>
<ul class="md-nav__list" data-md-scrollfix>
{% for toc_item in toc_ %}
{% include "partials/toc-item.html" %}
{% endfor %}
{% if page.meta.source and page.meta.source | length > 0 %}
<li class="md-nav__item">
<a href="#__source" title="{{ lang.t('meta.source') }}" class="md-nav__link md-nav__link--active">
{{ lang.t("meta.source") }}
</a>
</li>
{% endif %}
{% set disqus = config.extra.disqus %}
{% if page and page.meta and page.meta.disqus is string %}
{% set disqus = page.meta.disqus %}
{% endif %}
{% if not page.is_homepage and disqus %}
<li class="md-nav__item">
<a href="#__comments" title="{{ lang.t('meta.comments') }}" class="md-nav__link md-nav__link--active">
{{ lang.t("meta.comments") }}
</a>
</li>
{% endif %}
</ul>
{% endif %}
</nav>

55
docs/1.md Normal file
View File

@ -0,0 +1,55 @@
# Part I. Spring Boot 文档
本节简要介绍了Spring Boot文档是整个文档的参考指南。 您可以完整阅读本参考指南,或者如果您不感兴趣的话可以跳过该部分。
## [](http://blog.geekidentity.com/spring/spring_boot_translation/#1-关于文档 "1\. 关于文档")1\. 关于文档
Spring Boot参考指南可以以 [html](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/html)[pdf](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/pdf/spring-boot-reference.pdf) 和 [epub](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/epub/spring-boot-reference.epub) 文档的形式获取。 最新版本的文档可在 [http://docs.spring.io/spring-boot/docs/current/reference](http://docs.spring.io/spring-boot/docs/current/reference) 中找到。
本文档您可以自己使用,或发布给别人,印刷版还是以电子形式都可以,但必须包含本版权声明,不可进行盈利。
## [](http://blog.geekidentity.com/spring/spring_boot_translation/#2-获得帮助 "2\. 获得帮助")2\. 获得帮助
如果使用 Spring Boot 时遇到问题,可以在下面获取帮助:
* 尝试 [How-tos](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#howto) - 这里为最常见的问题提供解决方案。
* 了解Spring的基础知识 - Spring Boot建立在许多其他Spring项目上请查看 [spring.io](https://spring.io/) 网站以获取其他项目的参考文档。 如果您刚刚开始使用Spring请阅读这个[指南](https://spring.io/guides)。
* 在stackoverflow上提问题 - 我们会一起关注 [stackoverflow.com](https://stackoverflow.com/) 上有spring-boot标签的问题。
* 在[Github](https://github.com/spring-projects/spring-boot/issues)上报告bug。
> Spring Boot 所有的东西都是开源的,包括文档! 如果您发现文档有问题; 或者如果你想改进他们,欢迎[参与](https://github.com/spring-projects/spring-boot/tree/v1.5.2.RELEASE)。
## [](http://blog.geekidentity.com/spring/spring_boot_translation/#3-第一步 "3\. 第一步")3\. 第一步
如果你刚刚开始使用 Spring Boot或刚刚开始使用“Spring”[请从这里开始!](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#getting-started)
* 从头开始:[概述](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#getting-started-introducing-spring-boot) | [要求](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#getting-started-system-requirements) | [安装](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#getting-started-installing-spring-boot)
* 教程:[Part 1](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#getting-started-first-application) | [Part 2](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#getting-started-first-application-code)
* 运行你的例子:[Part 1](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#getting-started-first-application-run) | [Part 2](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#getting-started-first-application-executable-jar)
## [](http://blog.geekidentity.com/spring/spring_boot_translation/#4-使用-Spring-Boot "4\. 使用 Spring Boot")4\. 使用 Spring Boot
* 构建系统: [Maven](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-boot-maven) | [Gradle](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-boot-gradle) | [Ant](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-boot-ant) | [Starters](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-boot-starter)
* 最佳做法:[代码结构](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-boot-structuring-your-code) | [@Configuration](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-boot-configuration-classes) | [@EnableAutoConfiguration](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-boot-auto-configuration) | [Beans 和依赖注入](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-boot-spring-beans-and-dependency-injection)
* 运行代码:[IDE](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-boot-running-from-an-ide) | [Packaged](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-boot-running-as-a-packaged-application) | [Maven](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-boot-running-with-the-maven-plugin) | [Gradle](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-boot-running-with-the-gradle-plugin)
* 打包应用程序: [Production jars](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-boot-packaging-for-production)
* Spring Boot CLI[使用CLI](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#cli)
## [](http://blog.geekidentity.com/spring/spring_boot_translation/#5-了解Spring-Boot功能 "5\. 了解Spring Boot功能")5\. 了解Spring Boot功能
需要有关Spring Boots核心功能的更多细节请看[这里](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#boot-features)
* 核心功能: [SpringApplication](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#boot-features-spring-application) | [External Configuration](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#boot-features-external-config) | [Profiles](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#boot-features-profiles) | [Logging](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#boot-features-logging)
* Web 应用: [MVC](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#boot-features-spring-mvc) | [Embedded Containers](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#boot-features-embedded-container)
* 数据处理: [SQL](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#boot-features-sql) | [NO-SQL](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#boot-features-nosql)
* 消息处理: [Overview](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#boot-features-messaging/) | [JMS](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#boot-features-jms)
* 测试: [Overview](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#boot-features-testing) | [Boot Applications](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#boot-features-testing-spring-boot-applications) | [Utils](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#boot-features-test-utilities)
* 扩展: [Auto-configuration](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#boot-features-developing-auto-configuration) | [@Conditions](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#boot-features-condition-annotations)
## [](http://blog.geekidentity.com/spring/spring_boot_translation/#6-转移到生产环境 "6\. 转移到生产环境")6\. 转移到生产环境
当您准备好将Spring Boot 应用程序放到生产环境时,我们有一些您可能会喜欢的[技巧!](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#production-ready)
* 部署 Spring Boot 应用程序: [Cloud Deployment](http://note.youdao.com/) | [OS Service](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#deployment-service)
构建工具插件:[Maven](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#build-tool-plugins-maven-plugin) | [Gradle](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#build-tool-plugins-gradle-plugin)
附录: [Application Properties](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#common-application-properties) | [自动配置类](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#auto-configuration-classes) | [可执行 Jars](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#executable-jar)

56
docs/10.md Normal file
View File

@ -0,0 +1,56 @@
# 14\. 构建代码
Spring Boot不需要任何特定的代码组织结构但是有一些最佳实践可以帮助您。
### 14.1 不要使用“default”包
当类不包括包声明时,它被认为是在“默认包”中。 通常不鼓励使用“默认包”,并应该避免使用。 对于使用@ComponentScan@EntityScan或@SpringBootApplication注解的Spring Boot应用程序可能会有一些特殊的问题因为每个jar的每个类都将被读取。
> 我们建议您遵循Java推荐的软件包命名约定并使用反向域名例如com.example.project
### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#142-查找主应用程序类)14.2 查找主应用程序类
我们通常建议您将应用程序主类放到其他类之上的根包(root package)中。 @EnableAutoConfiguration注解通常放置在您的主类上,它隐式定义了某些项目的基本“搜索包”。 例如如果您正在编写JPA应用程序@EnableAutoConfiguration注解类的包将用于搜索@Entity项
使用根包(root package)还可以使用@ComponentScan注释而不需要指定basePackage属性。 如果您的主类在根包中,也可以使用@SpringBootApplication注释
这是一个典型的布局:
```
com
+- example
+- myproject
+- Application.java
|
+- domain
| +- Customer.java
| +- CustomerRepository.java
|
+- service
| +- CustomerService.java
|
+- web
+- CustomerController.java
```
Application.java文件将声明main方法以及基本的@Configuration
```
package com.example.myproject;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
@EnableAutoConfiguration
@ComponentScan
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
```

13
docs/11.md Normal file
View File

@ -0,0 +1,13 @@
# 15\. 配置类
Spring Boot支持基于Java的配置。虽然可以使用XML配置用SpringApplication.run()但我们通常建议您的主source是@Configuration类。 通常定义main方法的类也是作为主要的@Configuration一个很好的选择
> 许多使用XML配置的Spring示例已经在网上发布。 如果可能的话我们建议始终尝试使用等效的基于Java的配置。 搜索 enable* 注解可以是一个很好的起点。
### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#151-导入其他配置类)15.1 导入其他配置类
您不需要将所有的@Configuration放在一个类中@Import注解可用于导入其他配置类。 或者,您可以使用@ComponentScan自动扫描所有Spring组件,包括@Configuration类
### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#152-导入xml配置)15.2 导入XML配置
如果您必须使用基于XML的配置我们建议您仍然从@Configuration类开始。 然后,您可以使用的@ImportResource注释来加载XML配置文件

32
docs/12.md Normal file
View File

@ -0,0 +1,32 @@
# 16\. 自动配置
Spring Boot 会根据您添加的jar依赖关系自动配置您的Spring应用程序。例如如果HSQLDB在您的类路径上并且您没有手动配置任何数据库连接bean那么我们将自动配置内存数据库。
您需要通过将@EnableAutoConfiguration或@SpringBootApplication注解添加到您的一个@Configuration类中来选择自动配置
> 您应该只添加一个@EnableAutoConfiguration注解。 我们通常建议您将其添加到主@Configuration类中
### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#161逐渐取代自动配置)16.1逐渐取代自动配置
自动配置是非侵入式的,您可以随时定义自己的配置来替换自动配置。 例如,如果您添加自己的 DataSource bean则默认的嵌入式数据库支持将会退回。
如果您需要了解当前有哪些自动配置,以及为什么,请使用--debug开关启动应用程序。 这将启用debug日志并将自动配置日志记录到控制台。
### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#162-禁用指定的自动配置)16.2 禁用指定的自动配置
如果您发现正在使用一些不需要的自动配置类,可以使用@EnableAutoConfiguration的exclude属性来禁用它们
```
import org.springframework.boot.autoconfigure.*;
import org.springframework.boot.autoconfigure.jdbc.*;
import org.springframework.context.annotation.*;
@Configuration
@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
public class MyConfiguration {
}
```
如果类不在classpath路径上则可以使用注释的excludeName属性并指定全限定名(fully qualified name)。 最后您还可以通过spring.autoconfigure.exclude属性控制要排除的自动配置类列表。
> 注解和使用属性(property)定义都可以指定要排除的自动配置类。

47
docs/13.md Normal file
View File

@ -0,0 +1,47 @@
# 17\. Spring Beans 和 依赖注入
您可以自由使用任何标准的Spring Framework技术来定义您的bean及其依赖注入关系。 为了简单起见,我们发现使用@ComponentScan搜索bean,结合@Autowired构造函数(constructor)注入效果很好。
如果您按照上述建议(将应用程序类放在根包(root package)中)构建代码,则可以使用 @ComponentScan而不使用任何参数。 所有应用程序组件(@Component@Service@Repository@Controller等将自动注册为Spring Bean。
以下是一个@Service Bean的例子我们可以使用构造函数注入获取RiskAssessor bean。
```
package com.example.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class DatabaseAccountService implements AccountService {
private final RiskAssessor riskAssessor;
@Autowired
public DatabaseAccountService(RiskAssessor riskAssessor) {
this.riskAssessor = riskAssessor;
}
// ...
}
```
如果一个bean 只有一个构造函数,则可以省略@Autowired
```
@Service
public class DatabaseAccountService implements AccountService {
private final RiskAssessor riskAssessor;
public DatabaseAccountService(RiskAssessor riskAssessor) {
this.riskAssessor = riskAssessor;
}
// ...
}
```
> 注意如何使用构造函数注入允许将RiskAssessor字段标记为final表示不能更改。

23
docs/14.md Normal file
View File

@ -0,0 +1,23 @@
# 18\. 使用@SpringBootApplication注解
许多Spring Boot开发人员总是使用@Configuration@EnableAutoConfiguration和@ComponentScan来标注它们的主类。 由于这些注解经常一起使用(特别是如果您遵循之前说的[最佳实践](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-boot-structuring-your-code)Spring Boot提供了一个方便的@SpringBootApplication注解作为这三个的替代方法
@SpringBootApplication注解相当于使用@Configuration@EnableAutoConfiguration和@ComponentScan和他们的默认属性
```
package com.example.myproject;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication // same as @Configuration @EnableAutoConfiguration @ComponentScan
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
```
> @SpringBootApplication还提供了别名来定制@EnableAutoConfiguration和@ComponentScan的属性

62
docs/15.md Normal file
View File

@ -0,0 +1,62 @@
# 19\. 运行你的应用程序
将应用程序打包成jar并使用嵌入式HTTP服务器的最大优点之一就是可以按照你想用其他任何方式运行应用程序。调试Spring Boot应用程序也很容易; 您不需要任何专门的IDE插件或扩展。
> 本节仅涵盖基于jar的打包如果您选择将应用程序打包为war文件则应参考您的服务器和IDE的文档。
### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#191-从ide运行)19.1 从IDE运行
您可以从IDE中运行 Spring Boot 应用程序作为一个简单的Java应用程序但是首先需要导入项目。 导入步骤将根据您的IDE和构建系统而有所不同。 大多数IDE可以直接导入Maven项目例如Eclipse用户可以从File菜单中选择import...→Existing Maven Projects。
如果您无法将项目直接导入到IDE中则可以使用构建插件生成IDE元数据。 Maven包括Eclipse和IDEA的插件; Gradle为各种IDE提供插件。
> 如果您不小心运行了两次Web应用程序您将看到“Port already in use”中的错误。 使用STS用户可以使用重新启动按钮而不是运行以确保任何现有实例已关闭。
### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#192-作为已打包应用程序运行)19.2 作为已打包应用程序运行
如果您使用Spring Boot 的 Maven或Gradle插件创建可执行jar则可以使用java -jar运行应用程序。 例如:
```
$ java -jar target/myproject-0.0.1-SNAPSHOT.jar
```
也可以启用远程调试支持运行打包的应用程序。 这允许您将调试器添加到打包的应用程序中:
```
$ java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n \
-jar target/myproject-0.0.1-SNAPSHOT.jar
```
### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#193-使用-maven-插件)19.3 使用 Maven 插件
Spring Boot Maven 插件包含一个运行目标(goal ),可用于快速编译和运行应用程序。 应用程序以exploded的形式运行就像在IDE中一样。
```
$ mvn spring-boot:run
```
您可能还需要使用一些有用的操作系统环境变量:
```
$ export MAVEN_OPTS=-Xmx1024m -XX:MaxPermSize=128M
```
### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#194-使用gradle插件)19.4 使用Gradle插件
Spring Boot Gradlet插件还包括一个bootRun任务可用于以exploded 形式运行应用程序。 每当导入spring-boot-gradle-plugin时都会添加bootRun任务
```
$ gradle bootRun
```
您可能还想使用这个有用的操作系统环境变量:
```
$ export JAVA_OPTS=-Xmx1024m -XX:MaxPermSize=128M
```
### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#195-热插拔)19.5 热插拔
由于Spring Boot应用程序只是纯Java应用程序所以JVM热插拔应该是开箱即用的。 JVM热插拔在一定程度上受到可替代的字节码的限制更完整的解决方案可以使用 [JRebel](http://zeroturnaround.com/software/jrebel/) 或者 [Spring Loaded](https://github.com/spring-projects/spring-loaded) 项目。 spring-boot-devtools模块还支持快速重新启动应用程序。
有关详细信息,请参阅[第20章“开发人员工具”](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-boot-devtools)部分和[热插拔“操作方法”](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#howto-hotswapping)。

227
docs/16.md Normal file
View File

@ -0,0 +1,227 @@
# 20\. 开发工具
Spring Boot包括一组额外的工具可以使应用程序开发体验更加愉快。 spring-boot-devtools模块可以包含在任何项目中以提供额外的[开发时](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/development-time)功能。 要包含devtools支持只需将模块依赖关系添加到您的构建中
Maven
```
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
```
Gradle
```
dependencies {
compile("org.springframework.boot:spring-boot-devtools")
}
```
> 当运行完全打包的应用程序时,开发人员工具将自动禁用。 如果您的应用程序是使用java -jar启动的或者是使用特殊的类加载器启动那么它将会被认为是“生产环境的应用程序”。 将开发工具依赖关系标记为可选(optional)是一种最佳做法可以防止使用项目将devtools传递性地应用于其他模块。 Gradle不支持开箱即用的可选依赖项因此您可能希望在此期间查看[propdeps-plugin](https://github.com/spring-projects/gradle-plugins/tree/master/propdeps-plugin)。
> 重新打包的jar包默认情况下不包含devtools。 如果要使用某些[远程devtools功能](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-boot-devtools-remote)您需要禁用excludeDevtools 构建下的属性以包含devtools。 该属性支持Maven和Gradle插件。
### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#201-属性默认值)20.1 属性默认值
Spring Boots支持的几个库使用缓存来提高性能。 例如,[模板引擎](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#boot-features-spring-mvc-template-engines)将缓存编译的模板,以避免重复解析模板文件。 此外Spring MVC可以在返回静态资源时向响应中添加HTTP缓存头。
虽然缓存在生产中非常有益,但它在开发过程中可能会产生反效果,从而阻止您看到刚刚在应用程序中进行的更改。 因此spring-boot-devtools将默认禁用这些缓存选项。
缓存选项通常由您的application.properties文件中的设置配置。 例如Thymeleaf提供了spring.thymeleaf.cache属性。 spring-boot-devtools模块不需要手动设置这些属性而是自动应用更加合理的开发时(development-time)配置。
> 有关应用的属性的完整列表,请参阅 [DevToolsPropertyDefaultsPostProcessor](https://github.com/spring-projects/spring-boot/tree/v1.5.2.RELEASE/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/env/DevToolsPropertyDefaultsPostProcessor.java)。
### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#202-自动重启)20.2 自动重启
使用spring-boot-devtools的应用程序将在类路径上的文件发生更改时自动重新启动。 这在IDE中开发时可能是一个有用的功能因为它为代码更改提供了非常快的反馈循环。 默认情况下,将监视指向文件夹的类路径上的任何条目。 请注意,某些资源(如静态资源和视图模板)不需要重新启动应用程序。
触发重启
当DevTools监视类路径资源时触发重新启动的唯一方法是更新类路径中的文件时。 导致类路径更新的方式取决于您正在使用的IDE。 在Eclipse中保存修改的文件将导致类路径被更新并触发重新启动。 在IntelliJ IDEA中构建项目Build→Make Project将具有相同的效果。
> 只要 forking 被启用您也可以通过支持的构建插件即Maven和Gradle启动应用程序因为DevTools需要一个单独的应用程序类加载器才能正常运行。Gradle和Maven默认情况下在类路径上检DevTools。
> 自动重启当与LiveReload一起使用时工作非常好。 详见[下文](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-boot-devtools-livereload)。 如果您使用JRebel自动重启将被禁用有利于动态类重新加载。 其他devtools功能仍然可以使用如LiveReload和属性覆盖
> DevTools依赖于应用程序上下文的关闭钩子以在重新启动期间关闭它。 如果禁用了关闭挂钩SpringApplication.setRegisterShutdownHookfalseDevTools将无法正常工作。
> 当判断类路径中的项目是否会在更改时触发重新启动时DevTools会自动忽略名为spring-bootspring-boot-devtoolsspring-boot-autoconfigurespring-boot-actuator和spring-boot-start的项目。
重新启动(Restart) vs 重新加载(Reload)
Spring Boot提供的重新启动技术使用两个类加载器。 不会改的类例如来自第三方的jar被加载到基类加载器中。 您正在开发的类被加载到重新启动(restart)类加载器中。 当应用程序重新启动时,重新启动类加载器将被丢弃,并创建一个新的类加载器。 这种方法意味着应用程序重新启动通常比“冷启动”快得多,因为基类加载器已经可以使用。
如果发现重新启动对应用程序不够快或遇到类加载问题您可以考虑来自ZeroTurnaround的JRebel等重新加载技术。 这些工作通过在加载类时重写(rewriting)类,使其更适合重新加载。 Spring Loaded提供了另一个选项但是它在很多框架上不支持并且不支持商用。
#### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#2021-排除资源)20.2.1 排除资源
在类路径下,某些资源在更改时不一定需要触发重新启动。 例如Thymeleaf模板可以直接编辑不需重启。 默认情况下,有一些排除项,更改 /META-INF/maven/META-INF/resources/resources/static/public或/templates中的资源不会触发重新启动但会触发[实时重新加载](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-boot-devtools-livereload)。 如果要自定义这些排除项可以使用spring.devtools.restart.exclude属性。 例如,要仅排除 /static和 /public您可以设置
```
spring.devtools.restart.exclude=static/**,public/**
```
> 如果要保留这些默认值并添加其他排除项请改用spring.devtools.restart.additional-exclude属性。
#### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#2022-监视额外的路径)20.2.2 监视额外的路径
有时当您对不在类路径中的文件进行更改时需要重新启动或重新加载应用程序。为此请使用spring.devtools.restart.additional-paths属性来配置其他路径以监视更改。 您可以使用[上述](described above)的spring.devtools.restart.exclude属性来控制附加路径下的更改是否会触发完全重新启动或只是[实时重新加载](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-boot-devtools-livereload)。
#### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#2023-禁用重启)20.2.3 禁用重启
如果不想使用重新启动功能可以使用spring.devtools.restart.enabled属性来禁用它。 在大多数情况下您可以在application.properties中设置此项这仍将初始化重新启动类加载器但不会监视文件更改
例如如果您需要完全禁用重新启动支持因为它在一些特定库中不能正常运行则需要在调用SpringApplication.run...之前设置System属性。 例如:
```
public static void main(String[] args) {
System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(MyApp.class, args);
}
```
#### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#2024-使用触发文件)20.2.4 使用触发文件
如果您使用IDE工具编写代码更改文件则您可能希望仅在特定时间触发重新启动。 为此,您可以使用“触发文件”,这是一个特殊文件,当您要实际触发重新启动检查时,必须修改它。 更改文件只会触发检查只有在Devtools检测到它必须执行某些操作时才会重新启动。 触发文件可以手动更新也可以通过IDE插件更新。
要使用触发器文件请使用spring.devtools.restart.trigger-file属性。
> 您可能希望将spring.devtools.restart.trigger-file设置为[全局设置](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-boot-devtools-globalsettings),以使所有项目的行为方式相同。
#### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#2025-自定义重新启动类加载器)20.2.5 自定义重新启动类加载器
如上面的 [Restart vs Reload](http://docs.spring.io/spring-boot/docs/1.5.2.RELEASE/reference/htmlsingle/#using-spring-boot-restart-vs-reload) 部分所述,重新启动功能是通过使用两个类加载器实现的。 对于大多数应用程序,此方法运行良好,但有时可能会导致类加载问题。
默认情况下IDE中的任何打开的项目将使用“重新启动”类加载器加载任何常规.jar文件将使用“base”类加载器加载。 如果您在多模块项目上工作而不是每个模块都导入到IDE中则可能需要自定义事件。 为此您可以创建一个META-INF / spring-devtools.properties文件。
spring-devtools.properties文件可以包含restart.exclude 和 restart.include.prefixed属性。 include元素是应该被拉入“重新启动(restart)”类加载器的项目,排除元素是应该向下推入“基本(base)”类加载器的项目。 属性的值是将应用于类路径的正则表达式模式。
例如:
```
restart.exclude.companycommonlibs=/mycorp-common-[\\w-]+\.jar
restart.include.projectcommon=/mycorp-myproj-[\\w-]+\.jar
```
> 所有属性键必须是唯一的。 只要一个属性从restart.include. 或restart.exclude. 开始,将被考虑。
> 将加载类路径中的所有META-INF/spring-devtools.properties。 您可以在项目中打包文件,或者在项目所使用的库中打包文件。
#### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#2026-已知的限制)20.2.6 已知的限制
重新启动功能对于使用标准ObjectInputStream反序列化的对象无效。 如果需要反序列化数据可能需要使用Spring的ConfigurableObjectInputStream与Thread.currentThread()。getContextClassLoader()组合使用。
不幸的是,几个第三方库在不考虑上下文类加载器的情况下反序列化。 如果您发现这样的问题,您需要向原始作者请求修复。
### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#203-livereload)20.3 LiveReload
spring-boot-devtools模块包括一个嵌入式LiveReload服务器可以在资源更改时用于触发浏览器刷新。 LiveReload浏览器扩展程序可以从 [http://livereload.com](http://livereload.com/)免费获取ChromeFirefox和Safari的插件。
如果您不想在应用程序运行时启动LiveReload服务器则可以将spring.devtools.livereload.enabled属性设置为false。
> 一次只能运行一个LiveReload服务器。 开始应用程序之前请确保没有其他LiveReload服务器正在运行。 如果从IDE启动多个应用程序则只有第一个应用程序将支持LiveReload。
### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#204-全局设置)20.4 全局设置
您可以通过向 $HOME 文件夹添加名为.spring-boot-devtools.properties的文件来配置全局devtools设置请注意文件名以“.”开头)。 添加到此文件的任何属性将适用于您的计算机上使用devtools的所有Spring Boot应用程序。 例如,要配置重新启动以始终使用触发器文件,您可以添加以下内容:
~/.spring-boot-devtools.properties.
```
spring.devtools.reload.trigger-file=.reloadtrigger
```
### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#205远程应用)20.5远程应用
Spring Boot开发工具不仅限于本地开发。 远程运行应用程序时也可以使用多种功能。 远程支持是可选择的要使其能够确保重新打包的存档中包含devtools
```
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludeDevtools>false</excludeDevtools>
</configuration>
</plugin>
</plugins>
</build>
```
那么你需要设置一个spring.devtools.remote.secret属性例如
```
spring.devtools.remote.secret=mysecret
```
> 在远程应用程序上启用spring-boot-devtools是一种安全隐患。 您不应该在生产部署中启用该支持。
远程devtools支持分为两部分 有一个接受连接的服务器端和您在IDE中运行的客户端应用程序。 当spring.devtools.remote.secret属性设置时服务器组件将自动启用。 客户端组件必须手动启动。
#### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#2051-运行远程客户端应用程序)20.5.1 运行远程客户端应用程序
远程客户端应用程序旨在从IDE中运行。 您需要使用与要连接的远程项目相同的类路径运行org.springframework.boot.devtools.RemoteSpringApplication。 传递给应用程序的必选参数应该是您要连接到的远程URL。
例如如果您使用Eclipse或STS并且有一个名为my-app的项目已部署到Cloud Foundry则可以执行以下操作
* 从Run 菜单中选择Run Configurations…。
* 创建一个新的Java Application “launch configuration”。
* 浏览my-app项目。
* 使用org.springframework.boot.devtools.RemoteSpringApplication作为主类。
* 将
运行的远程客户端将如下所示:
```
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ ___ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | | _ \___ _ __ ___| |_ ___ \ \ \ \
\\/ ___)| |_)| | | | | || (_| []::::::[] / -_) ' \/ _ \ _/ -_) ) ) ) )
' |____| .__|_| |_|_| |_\__, | |_|_\___|_|_|_\___/\__\___|/ / / /
=========|_|==============|___/===================================/_/_/_/
:: Spring Boot Remote :: 1.5.2.RELEASE
2015-06-10 18:25:06.632 INFO 14938 --- [ main] o.s.b.devtools.RemoteSpringApplication : Starting RemoteSpringApplication on pwmbp with PID 14938 (/Users/pwebb/projects/spring-boot/code/spring-boot-devtools/target/classes started by pwebb in /Users/pwebb/projects/spring-boot/code/spring-boot-samples/spring-boot-sample-devtools)
2015-06-10 18:25:06.671 INFO 14938 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@2a17b7b6: startup date [Wed Jun 10 18:25:06 PDT 2015]; root of context hierarchy
2015-06-10 18:25:07.043 WARN 14938 --- [ main] o.s.b.d.r.c.RemoteClientConfiguration : The connection to http://localhost:8080 is insecure. You should use a URL starting with 'https://'.
2015-06-10 18:25:07.074 INFO 14938 --- [ main] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2015-06-10 18:25:07.130 INFO 14938 --- [ main] o.s.b.devtools.RemoteSpringApplication : Started RemoteSpringApplication in 0.74 seconds (JVM running for 1.105)
```
> 由于远程客户端正在使用与实际应用程序相同的类路径,因此可以直接读取应用程序属性。 这是spring.devtools.remote.secret属性如何读取并传递到服务器进行身份验证。
> 建议使用https//作为连接协议,以便流量被加密,防止密码被拦截。
> 如果需要使用代理访问远程应用程序请配置spring.devtools.remote.proxy.host和spring.devtools.remote.proxy.port属性。
#### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#2052-远程更新)20.5.2 远程更新
远程客户端将以与本地相同的方式监视应用程序类路径的更改。 任何更新的资源将被推送到远程应用程序,并且(如果需要的话)触发重新启动。 如果您正在迭代使用您当地没有的云服务的功能,这可能会非常有用。 通常,远程更新和重新启动比完全重建和部署周期要快得多。
> 仅在远程客户端运行时才监视文件。 如果在启动远程客户端之前更改文件,则不会将其推送到远程服务器。
#### [](file:///C:/Users/geekidentity/AppData/Local/Youdao/YNote/markdown/index.html#2053-远程调试隧道)20.5.3 远程调试隧道
在远程应用程序诊断问题时Java远程调试非常有用。 不幸的是,当您的应用程序部署在数据中心之外时,并不总是能够进行远程调试。 如果您正在使用基于容器的技术如Docker远程调试也可能难以设置。
为了帮助解决这些限制devtools支持基于HTTP隧道的传输远程调试传输。 远程客户端在端口8000上提供本地服务器您可以连接远程调试器。 建立连接后通过HTTP将调试数据发送到远程应用程序。 如果要使用其他端口可以使用spring.devtools.remote.debug.local-port属性更改。
您需要确保远程应用程序启用远程调试启用。 通常可以通过配置JAVA_OPTS来实现。 例如使用Cloud Foundry您可以将以下内容添加到manifest.yml中
```
---
env:
JAVA_OPTS: "-Xdebug -Xrunjdwp:server=y,transport=dt_socket,suspend=n"
```
> 请注意,您不需要将 address=NNNN 选项传递给-Xrunjdwp。 如果省略Java将随机选择一个的空闲端口。
> 通过网络调试远程服务可能很慢您可能需要在IDE中增加超时时间。 例如在Eclipse中您可以从Preferences...中选择Java→Debug 并将Debugger timeout (ms)更改为更合适的值大多数情况下60000可以正常工作
> 当使用IntelliJ IDEA的远程调试隧道时必须将所有调试断点配置为挂起线程而不是挂起VM。 默认情况下IntelliJ IDEA中的断点会挂起整个VM而不是仅挂起触发断点的线程。 这会导致挂起管理远程调试通道的线程等不必要的副作用,导致调试会话冻结。 当使用IntelliJ IDEA的远程调试隧道时应将所有断点配置为挂起线程而不是VM。 有关详细信息,请参阅[IDEA-165769](https://youtrack.jetbrains.com/issue/IDEA-165769)。

Some files were not shown because too many files have changed in this diff Show More