properties.properties配置文件

淩亂°似流年 2022-05-03 03:28 454阅读 0赞
  1. properties.properties
  2. driver=com.mysql.jdbc.Driver
  3. url=jdbc:mysql://localhost:3306/kgcnews?useUnicode=true&characterEncoding=UTF-8
  4. user=root
  5. password=root
  6. <!--引入配置文件,主要用这种-->
  7. <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
  8. <property name="location">
  9. <value>classpath:zscbbs.properties</value>
  10. </property>
  11. </bean>
  12. <!--引入配置文件,和上面一样效果,但在WEB.xml配置 启动服务时加载配置文件时会出错-->
  13. <context:property-placeholder location="properties.properties"/>

发表评论

表情:
评论列表 (有 0 条评论,454人围观)

还没有评论,来说两句吧...

相关阅读

    相关 nginx 配置文件配置

    nginx 分为三个模块 核心模块 : nginx最基本最核心的服务,例如 进程管理,权限控制,日志记录 http模块 第三方模块   nginx配置文件实例

    相关 配置文件

    / 程序头部注释开始 程序的版权和版本声明部分 Copyright (c) 2011, 烟台大学计算机学院学生