public class JNDIUtil extends Object
见:https://blog.csdn.net/u010430304/article/details/54601302
Constructor and Description |
---|
JNDIUtil() |
Modifier and Type | Method and Description |
---|---|
static InitialContext |
createInitialContext(Map<String,String> environment)
|
static InitialDirContext |
createInitialDirContext(Map<String,String> environment)
|
static Attributes |
getAttributes(String uri,
String... attrIds)
获取指定容器环境的对象的属性
如获取DNS属性,则URI为类似:dns:hutool.cn |
public static InitialDirContext createInitialDirContext(Map<String,String> environment)
environment
- 环境参数,null
表示无参数InitialDirContext
public static InitialContext createInitialContext(Map<String,String> environment)
environment
- 环境参数,null
表示无参数InitialContext
public static Attributes getAttributes(String uri, String... attrIds)
uri
- URI字符串,格式为[scheme:][name]/[domain]attrIds
- 需要获取的属性ID名称Attributes
Copyright © 2024. All rights reserved.