jinfo(Configuration info for Java) jinfo的作用是实时地查看和调整虚拟机各项参数. jinfo 命令格式: jinfo [ option ] pid pid是虚拟机进程ID(用jps可以查询) option 列表: 选项 说明 -flag to print the value of the named VM flag -flag [+|-] to enable or disable the named VM flag -flag = to set the n
第一种方法是使用java.io和java.util包,缺点是路径的概念要清晰, 例子: Properties prop = new Properties(); InputStream in = getClass().getResourceAsStream("/common.properties"); try { prop.load(in); pool = new JedisPool(config, prop.getProperty("pay.redis.url"))