巨野菏泽网站建设,wordpress post 模板,网站h标签,网站排名优化化快排优化如何获取.properties配置文件中的参数#xff0c;我在网上查了半天没弄明白#xff0c;后来在以前的项目中找到了#xff0c;就写下来#xff0c;避免遗忘。1.配置文件#xff1a;message_product.propertiestotal_product2service11,新股发行短信提醒服务,发行的详细信息…如何获取.properties配置文件中的参数我在网上查了半天没弄明白后来在以前的项目中找到了就写下来避免遗忘。1.配置文件message_product.propertiestotal_product2service11,新股发行短信提醒服务,发行的详细信息service22,配股短信提醒服务增发短信提醒服务,增发的详细信息validatecode_temp验证码${vilidateCode}。#消息持续发送时间单位”小时“message_constant_time24#消息的编码格式 15 GBK编码 30 彩信 31 wappush 32 长短信 33个性彩信message_formart15#消息的优先级: 0 最低 --- 3 最高;message_priority3#消息的下发类型: 0 免费下发 1 按条下发 2 包月下发 3 订阅请求 4 取消请求 5 包月扣费;message_type0#产品ID numproductidmessage_product_id724#numchannelidmessage_channelid02.java 类package com.margin.utils;import java.io.UnsupportedEncodingException;import java.util.ResourceBundle;import com.margin.po.MessageProduct;public class MessageProperties {private static ResourceBundle rb;static {rb ResourceBundle.getBundle(message_product);}/*** 得到短信服务总数* return*/public static int getTotalProduct() {return Integer.parseInt(rb.getString(total_product));}/*** 消息持续发送时间* return*/public static int getMessageConstantTime(){return Integer.parseInt(rb.getString(message_constant_time).trim());}/*** 消息格式* return*/public static int getMessageFormat(){return Integer.parseInt(rb.getString(message_formart).trim());}/*** 消息发送优先级* return*/public static int getMessagePriority(){return Integer.parseInt(rb.getString(message_priority).trim());}