类 JndiPropertySource
java.lang.Object
cn.taketoday.core.env.PropertySource<JndiLocatorDelegate>
cn.taketoday.jndi.JndiPropertySource
PropertySource implementation that reads properties from an underlying Framework
JndiLocatorDelegate.
By default, the underlying JndiLocatorDelegate will be configured with its
"resourceRef" property set to
true, meaning that names looked up will automatically be prefixed with
"java:comp/env/" in alignment with published
JNDI
naming conventions. To override this setting or to change the prefix, manually
configure a JndiLocatorDelegate and provide it to one of the constructors here
that accepts it. The same applies when providing custom JNDI properties. These should
be specified using JndiAccessor.setJndiEnvironment(java.util.Properties)
prior to construction of the JndiPropertySource.
- 从以下版本开始:
- 4.0
- 作者:
- Chris Beams, Juergen Hoeller
- 另请参阅:
-
JndiLocatorDelegateApplicationContextInitializercn.taketoday.web.config.WebApplicationInitializer
-
嵌套类概要
从类继承的嵌套类/接口 cn.taketoday.core.env.PropertySource
cn.taketoday.core.env.PropertySource.StubPropertySource -
字段概要
从类继承的字段 cn.taketoday.core.env.PropertySource
name, source -
构造器概要
构造器构造器说明JndiPropertySource(String name) Create a newJndiPropertySourcewith the given name and aJndiLocatorDelegateconfigured to prefix any names with "java:comp/env/".JndiPropertySource(String name, JndiLocatorDelegate jndiLocator) Create a newJndiPropertySourcewith the given name and the givenJndiLocatorDelegate. -
方法概要
修饰符和类型方法说明getProperty(String name) This implementation looks up and returns the value associated with the given name from the underlyingJndiLocatorDelegate.从类继承的方法 cn.taketoday.core.env.PropertySource
containsProperty, equals, getName, getSource, hashCode, named, toString
-
构造器详细资料
-
JndiPropertySource
Create a newJndiPropertySourcewith the given name and aJndiLocatorDelegateconfigured to prefix any names with "java:comp/env/". -
JndiPropertySource
Create a newJndiPropertySourcewith the given name and the givenJndiLocatorDelegate.
-
-
方法详细资料
-
getProperty
This implementation looks up and returns the value associated with the given name from the underlyingJndiLocatorDelegate. If aNamingExceptionis thrown during the call toJndiLocatorDelegate.lookup(String), returnsnulland issues a DEBUG-level log statement with the exception message.- 指定者:
getProperty在类中cn.taketoday.core.env.PropertySource<JndiLocatorDelegate>
-