|
楼主 |
发表于 2021-2-7 15:31:40
|
显示全部楼层
在入口方法处加入:
NCLocator.getInstance().lookup(ISecurityTokenCallback.class).token("NCSystem".getBytes(),"pfxx".getBytes());
即可。
如:
@SuppressWarnings("unchecked")
@GET
@Path("/listAllProperties")
@Produces(MediaType.APPLICATION_JSON+ ";" + CHARSET_UTF_8)
public JSONObject listAllProperties() {
NCLocator.getInstance().lookup(ISecurityTokenCallback.class).token("NCSystem".getBytes(),"pfxx".getBytes());
JSONObject result = new JSONObject();
PropertiesConfigureClient cc= (PropertiesConfigureClient) ConfigureClient.getPropertiesInstance("x");
Map<String,Properties> map = cc.listAllProperties();
result.put("PorpertesList", map);
return result;
} |
|