關於springboot的版本問題小記

2021-10-07 18:33:42 字數 344 閱讀 5650

webmvcconfigurationadapter 在spring boot 2.0被廢棄了,如果遇到使用 webmvcconfigurationsupport 而靜態檔案不顯示css樣式的,這是因為替換之後之前的靜態資源檔案 會被攔截,導致無法可用。

解決辦法:重寫 addresourcehandlers()方法,加入靜態檔案路徑即可

**如下:

@override

protected

void

addresourcehandlers

(resourcehandlerregistry registry)

springboot版本介紹

spring boot的版本號分析一下 下面是從官網的截圖的官方版本號 2020年3月15日擷取 這些數字和單詞是什麼意思?解釋一下。以2.2.5 current ag這個當前版本為例 其中各個數字表示含義 主版本,主版本一般情況下是不變的,除非有大機制或者是架構的調整,才會去調整主版本。且主版本之...

關於springboot的logback的配置

1 pom檔案引入jar包 dependency groupid org.springframework.boot groupid artifactid spring boot starter logging artifactid version 1.5.2.release version depe...

Spring Boot 指定某個依賴的版本

spring boot 是個很好的框架,他為了他的一些功能生效,定義了一些依賴的版本。比如說 spring boot 1.5.x 中elasticsearch是2.4.x的,這個是他本身就定義好的。但是有時我們確需訪問5.x的。不要問我為什麼放著stater不用,偏要訪問5.x的,唉。就可以在dep...