4 1 yaml配置注入

2022-06-11 03:27:10 字數 536 閱讀 1411

給實體類賦值方式一:使用@value()+@component

@data

@allargsconstructor

@noargsconstructor

@component

public

class dog implements

serializable

方式二:使用 *.properties配置 + @propertiessource(value = "classpath:nbg.properties") + @value("$")例如nbg.properties → name = 張無忌

}

有嚴格的縮排規則

屬性的值和大小敏感

例:兩個層級

例:大小寫

字串預設不用加雙引號和單引號雙引號:不會轉義特殊字串的內容,會表達特殊字串的本身意義

單引號:會轉義特殊字串的內容,輸出字串

物件:map:

list set

41 注入篇 注入工具SQLmap使用

sqlmap是一種開源的滲透測試工具,可以自動檢測和利用sql注入漏洞以及接入該資料庫的伺服器。它擁有非常強大的檢測引擎 具有多種特性的滲透測試器 通過資料庫指紋提取訪問底層檔案系統並通過外帶連線執行命令。支援的資料庫 mysql,oracle,postgresql,microsoft sql se...

Spring Boot 使用YAML配置

server port 8081 db configuration spring datasource driverclassname com.mysql.jdbc.driver url jdbc mysql localhost 3307 microservice username root pas...

YAML配置檔案讀取

yaml格式的檔案拓展名包括 yml和.yaml,兩個都表示yaml檔案 xml格式的檔案拓展名為 xml 基本語法規則 資料結構 string foo integer 1234 float 1234.5 boolean true list 1.0,mixed list dictionary 引用 ...