C-a n -> Next,切换到下个 window
C-a p -> Previous,前一个 window
C-a 1..9 -> 切换到第 1..9 个window
C-a K(大写) -> kill window,强行关闭当前的 window
C-a [ -> 进入 copy mode,在 copy mode 下可以回滚、搜索、
H(大写) High,将光标移至左上角
L Low,将光标移至左下角
工程路径问题
开发时:
// 得到工程的路径:System.getProperty("user.dir") 结果:D:\TEST
static String separator=File.separator;
static String projectPath = System.getProperty("user.dir") ;
static String resourcesPath=projectPath+separator+"src"+separator+"main"+separator+"resources";
发布时,util-commons 中FilePath 文件中用如下形式
static String separator=File.separator;
static String projectPath = Thread.currentThread().getContextClassLoader().getResource("").getPath() ;
static String resourcesPath=projectPath+separator+"resources";
项目clean install
生成target文件夹,其中添加resource文件夹 将工程中的资源文件加入resource中即可
web项目:用
String projectPath = SysRuleSyspospointDiscountBean.class.getProtectionDomain().getCodeSource().getLocation().getPath();
String resourcesPath = projectPath.split("WEB-INF")[0] + "resources";
String mqConfFilePath = resourcesPath + File.separator + "rabbitMq" + File.separator;
String mqConfFileName = mqConfFilePath + "rabbitMqConf.properties";
资源文件路径不能包含空格和汉字
jsf 方法调用传惨方法
||
但注意f:param只能对commandLink起作用,
用f:attribute比较好
例子如下:
<h:commandButton value="Press here" actionListener="#{myBean.action}">
<f:attribute name="attrname1" value="attrvalue1" />
<f:attribute name="attrname2" value="attrvalue2" />
...
</h:commandButton>
public void action(ActionEvent event)
{
String attrvalue1 = (String) event.getComponent().getAttributes().get("attrname1");
String attrvalue2 = (String) event.getComponent().getAttributes().get("attrname2");
...
}
调试web项目 outofmemory问题
||
run config jre vm-argument