Advertisement
Advertisement

More Related Content

Advertisement

Recently uploaded(20)

Advertisement

Ch14 簡介 Spring Boot

  1. 1
  2. 14 • 簡介 Spring Boot 學習目標 • 認識 Spring Boot • 認識 Spring Tool Suite • 遷移微網誌至 Spring Boot 2
  3. 哈囉!Spring Boot! • Spring Initializer – start.spring.io 3
  4. 4
  5. 哈囉!Spring Boot! • Spring Boot 將開發 Web 時必要的相依程式庫, 都整理在這個 Starter 相依之中 • 不用自行設定 spring-webmvc、spring-context 等相依程式庫 • 使用的 Spring 版本,決定於使用的 Spring Boot 版本 5
  6. 哈囉!Spring Boot! • @SpringBootApplication • 相當於標註了 @Configuration、 @EnableAutoConfiguration 與 @ComponentScan 6
  7. 哈囉!Spring Boot! • Spring Boot 會自動看看相依程式庫設定,自 動產生並注入元件 • 在 Spring Boot 一開始感覺像是零組態,然 而這並不是表示不需要任何設定 • 有許多設定都有預設值或行為了,在想要預 設值以外的設定時,才需要進行相關組態 7
  8. 哈囉!Spring Boot! 8
  9. 使用 spring 指令 9
  10. Spring Tool Suite 10
  11. 11
  12. 12
  13. Spring Web、Thymeleaf • 希望能即時看到模版修改後的結果,可以將 快取關掉 13
  14. Spring Web、Thymeleaf 14
  15. Spring Web、Thymeleaf 15
  16. JDBC API 基本設定 16
  17. 17
  18. Spring Security 基本設定 18
  19. 19
  20. 20
  21. 21
  22. 微網誌與 Spring Boot • 微網誌成果遷移至 Spring Boot,這可以簡化 不少設定 22
Advertisement