main方法获取springboot配置文件夹中的值

        ResourceBundle resource = ResourceBundle.getBundle("application");

        String value = new String(resource.getString("ip").trim().getBytes("ISO-8859-1"), "UTF8");//防止中文乱码

猜你喜欢

转载自blog.csdn.net/somdip/article/details/109673449