这是整个调用的Stacktrace
Thread [main] (Suspended)
owns: Object (id=22)
PropertyPlaceholderConfigurer.resolveSystemProperty(String) line: 358
PropertyPlaceholderConfigurer.resolvePlaceholder(String, Properties, int) line: 324
PropertyPlaceholderConfigurer$PropertyPlaceholderConfigurerResolver.resolvePlaceholder(String) line: 418
PropertyPlaceholderHelper.parseStringValue(String, PlaceholderResolver, Set<String>) line: 146
PropertyPlaceholderHelper.replacePlaceholders(String, PropertyPlaceholderHelper$PlaceholderResolver) line: 125
PropertyPlaceholderConfigurer$PlaceholderResolvingStringValueResolver.resolveStringValue(String) line: 403
BeanDefinitionVisitor.resolveStringValue(String) line: 281
BeanDefinitionVisitor.resolveValue(Object) line: 202
BeanDefinitionVisitor.visitPropertyValues(MutablePropertyValues) line: 140
BeanDefinitionVisitor.visitBeanDefinition(BeanDefinition) line: 81
PropertyPlaceholderConfigurer.processProperties(ConfigurableListableBeanFactory, Properties) line: 284
PropertyPlaceholderConfigurer(PropertyResourceConfigurer).postProcessBeanFactory(ConfigurableListableBeanFactory) line: 75
FileSystemXmlApplicationContext(AbstractApplicationContext).invokeBeanFactoryPostProcessors(Collection<BeanFactoryPostProcessor>, ConfigurableListableBeanFactory) line: 663
FileSystemXmlApplicationContext(AbstractApplicationContext).invokeBeanFactoryPostProcessors(ConfigurableListableBeanFactory) line: 638
FileSystemXmlApplicationContext(AbstractApplicationContext).refresh() line: 407
FileSystemXmlApplicationContext.<init>(String[], boolean, ApplicationContext) line: 140
FileSystemXmlApplicationContext.<init>(String) line: 84
Main.main(String[]) line: 14
这是方法内部, 一清二楚啊。。
/**
* Resolve the given key as JVM system property, and optionally also as
* system environment variable if no matching system property has been found.
* @param key the placeholder to resolve as system property key
* @return the system property value, or <code>null</code> if not found
* @see #setSearchSystemEnvironment
* @see java.lang.System#getProperty(String)
* @see java.lang.System#getenv(String)
*/
protected String resolveSystemProperty(String key) {
try {
String value = System.getProperty(key);
if (value == null && this.searchSystemEnvironment) {
value = System.getenv(key);
}
return value;
}
catch (Throwable ex) {
if (logger.isDebugEnabled()) {
logger.debug("Could not access system property '" + key + "': " + ex);
}
return null;
}
}
分享到:
相关推荐
Java中System.getProperty的使用
这是本人在进行使用递归替换HTML文件中的图片内容时,所遇到的问题解决方案,喜欢能够帮到大家,让自己懂得东西越来愈多,做更多的分享
System.getProperty 通过该方法获取系统属性信息 很好
主要介绍了Java的System.getProperty()方法获取大全,罗列了System.getProperty()方法获取各类信息的用法,具有一定的参考借鉴价值,需要的朋友可以参考下
java获取操作系统名称,通过 System.getProperty("os.name") 由于JDK的bug,Windows Server 2012 R2获取到的System.getProperty("os.name") 为 Window NT unknown 因此需要通过JNA(Java Native Access )调用...
intellij idea 多module时,System.getProperty("user.dir")获取的是默认路径。此文档修改获取到的module路径。使获取的路径到当前module实际路径。亲测好用
java log4j统一打印在user.dir目录下(windows、linux通用、不用考虑不同操作系统分隔符不一致的情况)
用反射原理 从配置文件中读取数据 public static void main(String[] args) throws Exception{ Properties pro=new Properties(); pro.load(new FileInputStream("fanshe.txt")); //Class c=null; String ...
使用 System.getProperty(“property_name”)来获取属性值,以下是BlackBerry9700 的 值: 1. microedition.encoding 属性:代表手机默认的字符集名称 返回值:“ISO-8859-1” 2. microedition.configuration ...
Java连接数据库代码实现代码, 代码片段: public MyTask(ServletContext context) { this.mContext = context; Properties prop = new Properties();... System.out.println("sql ip: "+this.sql_ip);
本地离线查看类似fastjson-1.2.21-javadoc.jar这样的doc文件,原理其实也是java读取该压缩文件,解压到System.getProperty("java.io.tmpdir")/javadoc-viewer下,再调用浏览器打开里面的index.html文件。 每次可以...
作用:列出当前系统所有的属性及对应属性值。 使用方法:在当前文件路径运行“java -jar showsystemproperties.jar”。 使用场景:忘记了System.getProperty(String key)中的属性名等。
String template=System.getProperty("user.dir")+"\\src\\template.xls";//模板文件 String book=System.getProperty("user.dir")+"\\src\\book.xls"; Workbook wb=Workbook.getWorkbook(new File(template))...
System.out.println(System.getProperty("java.io.tmpdir")); System.out.println(filename); %> <img src="<%= graphURL %>" width="600" height="400" border="0" usemap="#<%= filename %>"> 记得在每次调用...
利用System.getProperty()函数获取当前路径: System.out.println(System.getProperty("user.dir"));//user.dir指定了当前的路径
jacob.jar1.19及使用方法 解压后获得3个文件 jacob.jar jacob-1.17-x64.dll jacob-1.17-x86.dll jacob.jar 放到项目的lib目录 win7 jacob-1.17-x64.dll 放到C:\Windows\System32 jacob-1.17-x86.dll 放到C:\...
请注意:加入百度ueditor插件的项目或产品,在linux下部署无问题,只要部署好就可以,但是如果是windows系统的话,上传... //System.out.println("操作系统类型>>>>"+System.getProperty("os.name")); return str; }
new File(System.getProperty("user.home")+File.separator+"Videos"); 其它: new File(System.getProperty("user.home")+File.separator+"Movies"); 我的电脑是C:\Documents and Settings\hz001\Videos这个路径 ...
1.将jacob.jar导入到项目的lib中去 2.将Jacob.dll放至“WINDOWS\SYSTEM32”下面(或者放在对应的jdk目录下 如:C:\Program ...附:可以通过System.out.println(System.getProperty("java.library.path"))查出jdk的信息
获取服务器的参数和属性资源,简单的使用了J2EE架构进行B/S结构的部署。 示例: // a)取硬盘已有的分区及其详细信息(通过sigar.getFileSystemList()来获得FileSystem列表对象,然后对其进行编历): public void ...