初識springboot 細節 自動配置

2021-10-04 15:37:43 字數 741 閱讀 2099

主程式類,入口類

public class helloworld

}

@target()

@retention(retentionpolicy.runtime)

@documented

@inherited

@springbootconfiguration//配置類標註在某個類上表示這是乙個spring boot的配置類 點進去configuration是最低層的配置檔案這是spring標註的註解配置類也是容器中的元件

@enableautoconfiguration//自動開啟配置功能,以前需要配置的東西spring boot幫我們配置了,加上這個註解就可以自動配置。這樣自動配置的功能就會生效,原理:

點進去看到

@autoconfigurationpackage//自動配置包再點進去:  //將主配置類所在包以及下面所有子包的所有元件都掃瞄一遍,
@import()//這個import就是spring的底層註解這個類來決定匯入哪個元件。點金這個類可以看到metadata,尋找包名
@import()

public @inte***ce enableautoconfiguration

@componentscan(

excludefilters =

), @filter(

type = filtertype.custom,

classes = )})

java語言語法細節(自用)

修飾符 訪問範圍大小順序 public 完全公開 protected 同一package或者子類中 無同一package private 本class 抽象class不能同時被static修飾符修飾 inte ce裡面方法預設為public abstract修飾 變數預設為public static...

資料處理中的細節(自用)

同時滿足兩個條件 data data.loc data.period 999 data.nuni 999 滿足某條件 bid nuni bid nuni bid nuni nuni 1 填充缺失值 data nuni data nuni fillna 999 移除相同 樣本 totalexposur...

初識springboot 引入thymeleaf

因為springboot不支援jsp 使用模板引擎 寫乙個頁面模板,和資料交給模板,生成乙個頁面。推薦thymeleaf 語法簡單功能強大,1.引入thymeleaf org.springframework.boot spring boot starter thymeleaf 修改版本 1.8 3....