-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Description
zhangkaitao opened SPR-10549 and commented
<context:property-placeholder location="classpath:resources.properties" ignore-unresolvable="true"/>
- resources.properties
abc=${dce}
dce=${none}
3
@Value("${abc}")
private String abc;
- appear
java.lang.StackOverflowError
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.naming.internal.VersionHelper12.getJndiProperties(VersionHelper12.java:106)
at com.sun.naming.internal.ResourceManager.getInitialEnvironment(ResourceManager.java:202)
at javax.naming.InitialContext.init(InitialContext.java:238)
at javax.naming.InitialContext.<init>(InitialContext.java:216)
at org.springframework.jndi.JndiTemplate.createInitialContext(JndiTemplate.java:136)
at org.springframework.jndi.JndiTemplate.getContext(JndiTemplate.java:103)
at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)
at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95)
at org.springframework.jndi.JndiLocatorDelegate.lookup(JndiLocatorDelegate.java:38)
at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:77)
at org.springframework.jndi.JndiLocatorDelegate.lookup(JndiLocatorDelegate.java:33)
at org.springframework.jndi.JndiPropertySource.getProperty(JndiPropertySource.java:82)
at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:73)
at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:59)
at org.springframework.core.env.AbstractEnvironment.getProperty(AbstractEnvironment.java:427)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer$1.getProperty(PropertySourcesPlaceholderConfigurer.java:131)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer$1.getProperty(PropertySourcesPlaceholderConfigurer.java:128)
at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:73)
at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:59)
at org.springframework.core.env.AbstractPropertyResolver$1.resolvePlaceholder(AbstractPropertyResolver.java:176)
at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:146)
at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:125)
why:
please see http://jinnianshilongnian.iteye.com/blog/1866892
Affects: 3.2.2
Reference URL: http://jinnianshilongnian.iteye.com/blog/1866880
Issue Links:
- Allow PropertyResolver implementations to ignore unresolvable ${placeholders} [SPR-9569] #14203 Allow PropertyResolver implementations to ignore unresolvable ${placeholders}
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug