?? managedbeanimpl.java
字號(hào):
package simon.tools.jmx;
import org.springframework.context.*;
import org.springframework.context.support.*;
public class ManagedBeanImpl
implements ManagedBean {
public ManagedBeanImpl() {}
private String someProperty;
public void setSomeProperty(String someProperty) {
this.someProperty = someProperty;
}
public String getSomeProperty() {
return someProperty;
}
public String doSomething() {
return "Here's some property: " + someProperty;
}
/**
* 運(yùn)行此類,即可訪問 http://localhost:9092管理所有的MBean,并能運(yùn)行其中的方法
* 其滋味真是妙不可言
* @param args
*/
public static void main(String[] args) {
String path = "simon/tools/jmx/springconfig.xml";
ApplicationContext context = new ClassPathXmlApplicationContext(path);
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -