本文整理汇总了Java中org.springframework.jndi.JndiLocatorDelegate.isDefaultJndiEnvironmentAvailable方法的典型用法代码示例。如果您正苦于以下问题:Java JndiLocatorDelegate.isDefaultJndiEnvironmentAvailable方法的具体用法?Java JndiLocatorDelegate.isDefaultJndiEnvironmentAvailable怎么用?Java JndiLocatorDelegate.isDefaultJndiEnvironmentAvailable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.jndi.JndiLocatorDelegate
的用法示例。
在下文中一共展示了JndiLocatorDelegate.isDefaultJndiEnvironmentAvailable方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isUsingJndi
import org.springframework.jndi.JndiLocatorDelegate; //导入方法依赖的package包/类
private boolean isUsingJndi() {
try {
return JndiLocatorDelegate.isDefaultJndiEnvironmentAvailable();
}
catch (Error ex) {
return false;
}
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:9,代码来源:HibernateJpaAutoConfiguration.java
示例2: isJndiAvailable
import org.springframework.jndi.JndiLocatorDelegate; //导入方法依赖的package包/类
protected boolean isJndiAvailable() {
return JndiLocatorDelegate.isDefaultJndiEnvironmentAvailable();
}
示例3: customizePropertySources
import org.springframework.jndi.JndiLocatorDelegate; //导入方法依赖的package包/类
/**
* Customize the set of property sources with those contributed by superclasses as
* well as those appropriate for standard servlet-based environments:
* <ul>
* <li>{@value #SERVLET_CONFIG_PROPERTY_SOURCE_NAME}
* <li>{@value #SERVLET_CONTEXT_PROPERTY_SOURCE_NAME}
* <li>{@value #JNDI_PROPERTY_SOURCE_NAME}
* </ul>
* <p>Properties present in {@value #SERVLET_CONFIG_PROPERTY_SOURCE_NAME} will
* take precedence over those in {@value #SERVLET_CONTEXT_PROPERTY_SOURCE_NAME}, and
* properties found in either of the above take precedence over those found in
* {@value #JNDI_PROPERTY_SOURCE_NAME}.
* <p>Properties in any of the above will take precedence over system properties and
* environment variables contributed by the {@link StandardEnvironment} superclass.
* <p>The {@code Servlet}-related property sources are added as
* {@link StubPropertySource stubs} at this stage, and will be
* {@linkplain #initPropertySources(ServletContext, ServletConfig) fully initialized}
* once the actual {@link ServletContext} object becomes available.
* @see StandardEnvironment#customizePropertySources
* @see org.springframework.core.env.AbstractEnvironment#customizePropertySources
* @see ServletConfigPropertySource
* @see ServletContextPropertySource
* @see org.springframework.jndi.JndiPropertySource
* @see org.springframework.context.support.AbstractApplicationContext#initPropertySources
* @see #initPropertySources(ServletContext, ServletConfig)
*/
@Override
protected void customizePropertySources(MutablePropertySources propertySources) {
propertySources.addLast(new StubPropertySource(SERVLET_CONFIG_PROPERTY_SOURCE_NAME));
propertySources.addLast(new StubPropertySource(SERVLET_CONTEXT_PROPERTY_SOURCE_NAME));
if (JndiLocatorDelegate.isDefaultJndiEnvironmentAvailable()) {
propertySources.addLast(new JndiPropertySource(JNDI_PROPERTY_SOURCE_NAME));
}
super.customizePropertySources(propertySources);
}
示例4: customizePropertySources
import org.springframework.jndi.JndiLocatorDelegate; //导入方法依赖的package包/类
/**
* Customize the set of property sources with those contributed by superclasses as
* well as those appropriate for standard portlet-based environments:
* <ul>
* <li>{@value #PORTLET_CONFIG_PROPERTY_SOURCE_NAME}
* <li>{@value #PORTLET_CONTEXT_PROPERTY_SOURCE_NAME}
* <li>{@linkplain StandardServletEnvironment#SERVLET_CONTEXT_PROPERTY_SOURCE_NAME "servletContextInitParams"}
* <li>{@linkplain StandardServletEnvironment#JNDI_PROPERTY_SOURCE_NAME "jndiProperties"}
* </ul>
* <p>Properties present in {@value #PORTLET_CONFIG_PROPERTY_SOURCE_NAME} will
* take precedence over those in {@value #PORTLET_CONTEXT_PROPERTY_SOURCE_NAME},
* which takes precedence over those in {@linkplain
* StandardServletEnvironment#SERVLET_CONTEXT_PROPERTY_SOURCE_NAME "servletContextInitParams"}
* and so on.
* <p>Properties in any of the above will take precedence over system properties and
* environment variables contributed by the {@link StandardEnvironment} superclass.
* <p>The property sources are added as stubs for now, and will be
* {@linkplain PortletApplicationContextUtils#initPortletPropertySources fully
* initialized} once the actual {@link PortletConfig}, {@link PortletContext}, and
* {@link ServletContext} objects are available.
* @see StandardEnvironment#customizePropertySources
* @see org.springframework.core.env.AbstractEnvironment#customizePropertySources
* @see PortletConfigPropertySource
* @see PortletContextPropertySource
* @see PortletApplicationContextUtils#initPortletPropertySources
*/
@Override
protected void customizePropertySources(MutablePropertySources propertySources) {
propertySources.addLast(new StubPropertySource(PORTLET_CONFIG_PROPERTY_SOURCE_NAME));
propertySources.addLast(new StubPropertySource(PORTLET_CONTEXT_PROPERTY_SOURCE_NAME));
propertySources.addLast(new StubPropertySource(StandardServletEnvironment.SERVLET_CONTEXT_PROPERTY_SOURCE_NAME));
if (JndiLocatorDelegate.isDefaultJndiEnvironmentAvailable()) {
propertySources.addLast(new JndiPropertySource(StandardServletEnvironment.JNDI_PROPERTY_SOURCE_NAME));
}
super.customizePropertySources(propertySources);
}