小编Mir*_*ate的帖子

如何在Spring安全性中编辑定时注销

我试图弄清楚Spring的轻型安全性的定时注销功能在哪里,以及如何编辑它以使用我的自定义注销方法.我的理解是存在一个可编辑的定时注销功能,我到目前为止一直无法找到它,如果我这样做,我不确定如何使用我的注销序列.

谢谢,MirroredFate

编辑清晰度:

它是一个web/servlet应用程序.我正在使用acegi安全性.

我现在正在使用Spring会话超时:

In web.xml:
<session-config>
    <session-timeout>5</session-timeout>
</session-config>
Run Code Online (Sandbox Code Playgroud)

发生超时时,我需要一种方法来执行一些代码.但是,我不知道如何做到这一点.

如果我无法使用此方法执行代码,我的理解是acegi有一种方法可以使会话超时; 但是,我也不知道该怎么做.我已经能够使用acegi在正常注销时执行代码:

<security:logout invalidate-session="true"
                success-handler-ref="Logout"
                logout-url="/logout.html" />
</security:http>
Run Code Online (Sandbox Code Playgroud)

所以,基本上,我如何使用acegi timed logout或会话超时发生时做同样的事情?

java spring spring-security logout

2
推荐指数
1
解决办法
6476
查看次数

Java GridBagConstraints的问题

所以,我需要我的布局看起来像这样:

{|Name|         |Info||Tag||Id|}
Run Code Online (Sandbox Code Playgroud)

现在它看起来像这样:

{|Name|   |Info|   |Tag|   |Id|}
Run Code Online (Sandbox Code Playgroud)

或多或少.这是我的代码:

    GridBagConstraints c;

    c = new GridBagConstraints(0, 0, 5, 1, .5, .1, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0,0,0,0), 5, 5);
    header.add(name, c);
    c = new GridBagConstraints(10, 0, 1, 1, .5, .1, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(1,1,1,1), 5, 5);
    header.add(id, c);
    c = new GridBagConstraints(8, 0, 2, 1, .5, .1, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(1,1,1,1), 5, 5);
    header.add(tag, c);
    c = new GridBagConstraints(6, 0, 2, 1, .5, .1, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(1,1,1,1), 5, 5);
    header.add(info, c);
Run Code Online (Sandbox Code Playgroud)

我应该如何更改以获得所需的结果?

java swing gridbaglayout

2
推荐指数
1
解决办法
203
查看次数

在emacs中使用F#Interactive?

好的,所以我刚刚为emacs提供了F#扩展.我现在需要弄清楚如何使我编写的脚本实际执行.在Visual Studio中,要运行它们,只需突出显示,右键单击,然后选择"发送到交互式".我不认为emacs有那种或类似的东西,但我不知道如何使f#脚本与fsi交互.所以,从本质上讲,如何使用emacs或终端编写脚本后运行脚本?

编辑:为了澄清,我在mac上运行emacs.

EDIT2:因为我在mac上运行,所以emacs无法执行脚本,因为fsi不存在作为mac的可用东西.显然.多么悲伤.我只会选择投票最多的答案为正确.

emacs f# fsi

1
推荐指数
2
解决办法
1777
查看次数

动态添加Jquery删除按钮不起作用

毫无疑问这很简单,但是我对jquery缺乏了解,这对我来说很复杂.基本上我有这个代码:

$(document).ready( 
    function() {
    $( "#remove")
    .click(function() {
        alert("I have been clicked!");
        $(this).parent().parent().remove();
    }); 
});
Run Code Online (Sandbox Code Playgroud)

我在表格中添加了一个按钮,用于删除它的行(参见上面的代码).按钮如下:

<td ><button id='remove' type='button'>Remove</button></td>
Run Code Online (Sandbox Code Playgroud)

但是,点击时它什么都不做.我认为这可能与文档加载后创建按钮的事实有关...但不知道如何处理它.

jquery button document-ready

1
推荐指数
1
解决办法
1092
查看次数

如何在java中编写actionlistener

以下是我的代码:

JLabel label1 = new JLabel("testcontent");
label1.setBounds(131, 57, 205, 74);

frame.getContentPane().add(label1);

JButton btn1 = new JButton("run");
btn1.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {

    }
});

btn1.setBounds(169, 206, 117, 25);
frame.getContentPane().add(btn1);
Run Code Online (Sandbox Code Playgroud)

当我尝试在actionPerformed中引用label1时,eclipse找不到label1.任何人都可以告诉我什么是错的?

java swing awt

1
推荐指数
1
解决办法
704
查看次数

Php使用html表中的数据

好的,基本上我有我添加到html表和保存按钮的数据.我希望这个按钮将表中的数据提交给php函数,以便我可以使用数据修改我的mysql数据库.我有修改数据库的工具,只要我能获得数据.但是,我不知道如何做到这一点.完成此任务的最佳方法是什么?

php post html-table

0
推荐指数
1
解决办法
3445
查看次数