@PropertySource and UTF-8 properties file

前端 未结 6 589
广开言路
广开言路 2020-12-20 23:11

Is it possible, using @PropertySource annotation, to configure the encoding that has to be used to load the property file?

An example to clarify my prob

6条回答
  •  囚心锁ツ
    2020-12-20 23:38

    It is now possible:

    @PropertySource(value = "classpath:/myprop.properties", encoding="UTF-8")

提交回复
热议问题