application.properties
person.last-name=小明
person.age=18
person.birth=2020/6/6
person.boss=false
person.maps.k1=v1
person.maps.k2=14
person.lists=a,b,c
person.dog.name=小狗
person.dog.age=3
properties 配置文件在 idea 中默認爲 utf-8 可能會亂碼
解決方法:
更改配置後,記得查看 application.properties 文件,其中的中文會變成亂碼,更正後重新運行測試,結果正常。