搶先一步
VMware 提供培訓和認證,以加速您的進度。
了解更多Spring Boot 0.5.0.M6 已經發布,現在可以在 Spring repo 中取得。安裝和使用說明位於專案網站或 github。此版本包含大量更新,包括
以下是一個快速範例,展示了遠端 Shell 和自動配置報告
@Grab("spring-boot-starter-shell-remote")
@Controller
class MyRemote {
}
當您使用 spring run example.groovy
執行此應用程式時,您應該會在日誌輸出中看到密碼
2013-11-10 12:48:09.264 INFO 33677 --- [ost-startStop-1] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization completed in 980 ms 2013-11-10 12:48:09.648 INFO 33677 --- [ runner-0] roperties$SimpleAuthenticationProperties : Using default password for shell access: 062813ce-aaaa-4b92-a50f-67b156a923dd 2013-11-10 12:48:09.700 INFO 33677 --- [ runner-0] .a.a.CrshAutoConfiguration$CrshBootstrap : Configuring property ssh.port=2000 from properties
您可以使用此密碼透過 SSH 連線到應用程式並試用可用的指令
$ ssh -p 2000 user@localhost
若要查看自動配置報告,只需點擊執行器端點 https://127.0.0.1:8080/autoconfigurationreport。