how to read properties file in spring project?

后端 未结 5 1366
梦谈多话
梦谈多话 2020-12-06 01:28

Before post this Question, I google to get Properties from Spring project(Its NOT web-based project). I am confused as every one are talking about application-context.xml an

5条回答
  •  萌比男神i
    2020-12-06 01:53

    Create new property file inside your src/main/resources/ directory and file extension must be .properties e.g. db.properties

    Write following context properties in your spring xml configuration file:

    Usage: ${property-key}

提交回复
热议问题