📄 e222. protecting system properties.txt
字号:
Access to system properties (System.getProperty()) is controlled with a policy file (see e220 Managing Policy Files). Here are examples of policy file entries for controlling access to system properties.
// grant all classes loaded from h1.com ability to read the `myprop' system properties
grant codeBase "http://h1.com/-" {
permission java.util.PropertyPermission "myprop", "read";
};
// grant ability to write the `myprop' system properties
grant codeBase "http://h2.com/-" {
permission java.util.PropertyPermission "myprop", "write";
};
// grant ability to read and write the `myprop' system properties
grant codeBase "http://h3.com/-" {
permission java.util.PropertyPermission "myprop", "read,write";
};
// grant ability to read all properties that start with `myprops.'
grant codeBase "http://h4.com/-" {
permission java.util.PropertyPermission "myprops.*", "read";
};
// grant ability to read all system properties
grant codeBase "http://h5.com/-" {
permission java.util.PropertyPermission "*", "read";
};
// grant ability to write all system properties
grant codeBase "http://h6.com/-" {
permission java.util.PropertyPermission "*", "write";
};
// grant ability to read and write all system properties
grant codeBase "http://h7.com/-" {
permission java.util.PropertyPermission "*", "read,write";
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -