直接點 CTRL + 類, 一般是編譯的內容, 能夠在不下載源碼時簡單看一下, 但有時編譯效果很差, 也沒有註釋說明等. 這時最好是下載源碼.html
IDE 中都有相應功能, IDEA 和 eclipse 都有相應功能
IDEA 中下載源碼 [Download Sources], 能夠只下載某個 jar 包對應的源碼.java
命令行方式能夠一次下載所有源碼:git
mvn dependency:sources ... Downloading from ssllrepo: http://dev.myrepo.com/artifactory/repo/com/fasterxml/classmate/1.3.4/classmate-1.3.4-sources.jar Downloaded from ssllrepo: http://dev.myrepo.com/artifactory/repo/com/fasterxml/classmate/1.3.4/classmate-1.3.4-sources.jar (48 kB at 694 kB/s) ...
下載的代碼會保存到本地 maven 庫裏, 即${user.home}/.m2/repository
下github
核心功能:spring
https://docs.spring.io/spring...sql
配置舉例:
三種方式
application.properties 或 application.yml 或命令行選項json
配置項segmentfault
# REMOTE DEVTOOLS (RemoteDevToolsProperties) spring.devtools.remote.context-path=/.~~spring-boot!~ # Context path used to handle the remote connection. spring.devtools.remote.proxy.host= # The host of the proxy to use to connect to the remote application. spring.devtools.remote.proxy.port= # The port of the proxy to use to connect to the remote application. spring.devtools.remote.restart.enabled=true # Whether to enable remote restart. spring.devtools.remote.secret= # A shared secret required to establish a connection (required to enable remote support). spring.devtools.remote.secret-header-name=X-AUTH-TOKEN # HTTP header used to transfer the shared secret.
對應的Java類
RemoteDevToolsProperties.javaapp
官方的 Java 包會在經過META-INF
目錄下的負載均衡
spring-autoconfigure-metadata.properties spring-configuration-metadata.json
例如:
~/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.0.3.RELEASE/spring-boot-autoconfigure-2.0.3.RELEASE.jar!/META-INF/spring-configuration-metadata.json
{ "hints": [ ..., { "name": "spring.datasource.data", "providers": [ { "name": "handle-as", "parameters": { "target": "java.util.List<org.springframework.core.io.Resource>" } } ] }, { "name": "spring.datasource.driver-class-name", "providers": [ { "name": "class-reference", "parameters": { "target": "java.sql.Driver" } } ] }, ... }
JSON 結構比較簡單, 容易看懂.
在這個文件裏定義了相應的配置項,數值類型,以及可能的備選項進行描述, 從而使得 IDE 能夠透過代碼提示, 方便用戶鍵入.
未完待續(鑑於不少轉載/抓取的從不註明出處,我先發個半截的)
未完待續
未完待續
未完待續
未完待續
未完待續
請 mark https://segmentfault.com/a/11... 等待更新。