2017-08-02 71 views
0

在我的Spring MVC应用程序应用程序中,我们正在维护很多配置文件,如.properties.txt文件。我想读取所有配置文件并将它们保存在应用程序上下文级别,以便我可以访问整个应用程序中的配置数据。在春天mvc应用程序中维护属性文件的最佳方式

例子:

  1. db.properties

    db.driveClassName=packages.DataSource 
    db.URL=some url.... 
    
  2. errorCodes.properties

    <error-code>=<error description> 
    
    ERR001=time out error occured 
    ERR002=The request was tampered 
    ERR003=transaction id is missing 
    
+0

您可以通过添加注释来连接所有属性文件。 – DivyaMaheswaran

回答

相关问题