遠程客戶端運行在ide中.運行`org.springframework.boot.devtools.RemoteSpringApplication`和遠程要連接項目的目錄一樣.需要唯一的參數就是遠程的url.
例如,eclipse有個項目` my-app`發布到了云服務.按下面步驟 執行:
* 選擇`run`菜單下的`Run Configurations…`
* 創建一個新的`Java Application`啟動配置
* 瀏覽項目` my-app`
* 使用`org.springframework.boot.devtools.RemoteSpringApplication`主要主程序
* 添加`遠程url`到`Program arguments`
eclipse啟動過程如下:
~~~
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ ___ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | | _ \___ _ __ ___| |_ ___ \ \ \ \
\\/ ___)| |_)| | | | | || (_| []::::::[] / -_) ' \/ _ \ _/ -_) ) ) ) )
' |____| .__|_| |_|_| |_\__, | |_|_\___|_|_|_\___/\__\___|/ / / /
=========|_|==============|___/===================================/_/_/_/
:: Spring Boot Remote :: 2.0.4.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`如何讀取屬性并將其傳遞給服務器進行身份驗證的方法。
>
>如要要通過代理訪問遠程應用,使用`spring.devtools.remote.proxy.host`和`spring.devtools.remote.proxy.port`
- I. Spring Boot Documentation
- 1.關于文檔
- 2. 獲取幫助
- 3.第一步
- 4.使用spring boot
- 5.學習spring boot的特點
- 6.轉移到生產
- 7.高級話題
- II. Getting Started
- 8.引入spring boot
- 9.系統需要
- 9.1 Servlet容器
- 10.安裝spring boot
- 10.1 java開發者安裝說明
- 10.1.1 Maven Installation
- 10.2 Installing the Spring Boot CLI TODO
- 10.3 從早期的版本升級
- 11.開發你的第一個spring boot應用
- 11.1 創建POM
- 11.2 添加Classpath依賴
- 11.3 寫代碼
- 11.3.1 @RestController 和@RequestMapping 注解
- 11.3.2 @EnableAutoConfiguration注解
- 11.3.3 main方法
- 11.4運行 Example
- 11.5 創建可執行的Jar
- 12.下一步要閱讀的
- III. Using Spring Boot
- 13.構建系統
- 13.1 依賴管理
- 13.2 Maven
- 13.2.1 繼承Starter Parent
- 13.2.2 不使用Spring Boot的Parent POM
- 13.2.3 使用Spring Boot Maven 插件
- 13.3. Gradle TODO
- 13.4. Ant TODO
- 13.5. Starters TODO
- 14.結構化代碼
- 14.1使用“default”包
- 14.2 主應用程序類的位置
- 15.配置類
- 15.1 引入新增的配置類
- 15.2 引入xml配置
- 16.自動化配置
- 16.1 逐漸替換自動配置
- 16.2 禁用特定的配置類
- 17.spring的bean和依賴配置
- 18.使用@SpringBootApplication注解
- 19.運行的你的程序
- 19.1 在IDE中運行
- 19.2 運行打包的jar
- 19.3 使用maven插件運行
- 19.4 使用Gradle 插件 TODO
- 19.5 熱交換
- 20.開發者工具
- 20.1 默認屬性
- 20.2 自動重啟
- 20.2.1 記錄環境評估的更改
- 20.2.2 排除Resources
- 20.2.3 監視其他路徑
- 20.2.4 禁止重啟
- 20.2.5 使用觸發文件
- 20.2.6 自定義重啟類加載器
- 20.2.7 了解限制
- 20.3 實時加載
- 20.4 全局設置
- 20.5 遠程應用
- 20.5.1 運行遠程客戶端
- 20.5.2 遠程更新
- 21.把你的應用打包到生產
- 22.下一步要閱讀的
- IV. Spring Boot features
- 23.spring應用
- 23.1 啟動失敗
- 23.10 管理功能
- 23.8 使用ApplicationRunner 或 CommandLineRunner
- 24.可擴展的配置
- 24.1 配置隨機值
- 24.2 訪問命令行屬性
- 24.3 配置文件
- 24.4 特定配置文件
- 24.5 屬性的占位符
- 24.6 使用yaml替代properties
- 24.7 類型安全的配置屬性
- 24.7.1 第三方配置
- 24.7.2 靈活的綁定
- 25.外部的配置profiles
- 25.1 追加可用的外部配置
- 25.2 編程式的設置外部配置
- 25.3 外部配置文件
- 26.日志
- 26.1 日志格式
- 26.2 控制臺輸出
- 26.2.1顏色代碼數據
- 26.3 文件輸出
- 26.4 日志級別
- 26.5 自定義日志配置
- 26.6 Logback擴展
- 26.6.1特定于配置文件的配置
- 26.6.2 環境屬性
- 26.6.3 logback.xml配置說明
- 27.開發web應用
- 27.1 spring mvc
- 27.1.1 Spring MVC自動配置
- 27.1.2 HttpMessageConverters
- 27.1.3 定制JSON序列號和反序列化
- 27.1.4 MessageCodesResolver
- 27.1.5 靜態內容
- 27.1.6 歡迎頁面
- 27.1.7 定制Favicon
- 27.1.8 路徑匹配和內容判斷
- 27.1.9 ConfigurableWebBindingInitializer
- 27.1.10 模板引擎
- 27.1.11 處理錯誤
- 27.1.12 Spring HATEOAS
- 27.1.13 跨域支持
- 27.2 spring webflux
- 28.安全
- 28.1 mvc安全
- httpSecurity,webSecurity,authenticationManager
- 29.使用SQL數據庫
- 29.1 配置數據源
- 29.1.1 嵌入式數據庫支持
- 29.1.2 可用于生產的數據庫
- 29.1.3 從JNDI DataSource獲取連接
- 30.使用NoSql技術
- 30.1 Redis
- 30.1.1 連接Redis
- 31.緩存
- 32.消息
- 32.1 jms
- 32.2 amqp
- 32.2.1 支持RabbitMQ
- 32.2.2 發送消息
- 32.2.3 接收消息
- 33.使用RestTemplate調用REST服務
- 34.使用WebClient調用REST 服務
- 35.驗證
- 36.發郵件
- 37.使用JTA的分布式事務
- 37.01 結合spring框架的本地事務
- 38. Hazelcast
- 39.定時任務
- 40.spring集成
- 41.spring會話
- 42.JMX的監控和管理
- 43.測試
- 43.1測試范圍的依賴
- 43.2 測試Spring應用
- 43.2 測試spring boot應用
- 44. WebSockets
- 45. Web Services
- 46.創建你自己的自動化配置
- 47. Kotlin的支持
- 48.下一步要閱讀的
- V. Spring Boot Actuator: Production-ready features
- 49.開啟生產用的特性
- 50.端點
- 50.1 啟動端點
- 50.2 暴露端點
- 50.3 安全的http端點
- 51.HTTP的監控和管理
- 52.JMX的監控和管理
- 53.日志
- 54.度量
- 55.審計
- 56.HTTP追蹤
- 57.過程監控
- 58.上云的支持
- 59.下一步要閱讀的
- VI. Deploying Spring Boot Applications
- 60.云端的部署
- 61.安裝spring boot應用
- 62.下一步要閱讀的
- VII. Spring Boot CLI
- 63.安裝CTL
- 64.使用CTL
- 65.使用Groovy Beans DSL開發應用
- 66.使用settings.xml配置CTL
- 67.下一步要閱讀的
- VIII. Build tool plugins
- 68. Spring Boot Maven插件
- 69. Spring Boot Gradle插件
- 70. Spring Boot AntLib模塊
- 71.其他構建系統的支持
- 72.下一步要閱讀的
- IX. ‘How-to’ guides
- 73.spring boot應用
- 74.屬性和配置
- 75.嵌入式的web服務器
- 76. Spring MVC
- 76.1 寫JSON風格的服務
- 76.2 寫XML風格的服務
- 76.3 定制Jackson ObjectMapper
- 76.4 定制@ResponseBody呈現
- 76.5 處理文件上傳
- 77. Jersey
- 78. HTTP Clients
- 79. 日志
- 80. 數據訪問
- 80.1 配置自己的數據源
- 81. 數據庫初始化
- 82. 消息
- 83. 批處理應用
- 84. Actuator
- 85. 安全
- 86. 熱交換
- 87.構建
- 88.傳統開發
- X. Appendices
- A.通用的配置
- B. 配置元信息
- C.自動配置類
- D. 測試自動配置注解
- E. 可執行的jar格式
- F. 依賴的版本