文章目录:
- 1、spring security3如何实现动态数据库?求源码
- 2、求个spring security2 表单登入可运行的代码 。谢谢 378656569@qq.com
- 3、如何在源码中调用sun.security.pkcs.PKCS7
spring security3如何实现动态数据库?求源码
您指的是对用户权限等信息通过配置文件或注解方式去给类或方法进行动态的配置管理还是指使用数据动态控制角色,如果是前者官方给出了很多实现方法的源码啊! 如果是后者我做过类似的,需要可以发你!
求个spring security2 表单登入可运行的代码 。谢谢 378656569@qq.com
spring security2的登录验证是由组件本身的代码实现的,你只需要做登陆页面即可,给你一个我在项目中使用过的登陆页面的源代码:
%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%
%@ taglib prefix='c' uri='' %
%@ taglib prefix='fmt' uri='' %
%@ page import="org.springframework.security.ui.AbstractProcessingFilter" %
%@ page import="org.springframework.security.ui.webapp.AuthenticationProcessingFilter" %
%@ page import="org.springframework.security.AuthenticationException" %
!-- Not used unless you declare a form-login login-page="/login.jsp"/ element --
html
head
meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /
meta http-equiv="pragma" content="no-cache" /
meta http-equiv="cache-control" content="no-cache" /
meta http-equiv="expires" content="0" /
style type="text/css"
#pic {
width: 480px;
height: 300px;
position: relative;
}
#pic fieldset{
margin: 0;
padding: 0;
border:0px
}
#pic div{
position: absolute;
top: 100px;
left:50px;
}
#pic div label{
float: left;
font-size:13px;
font-weight:bold;
width: 86px; /*width of label (left column)*/
text-transform: uppercase;
/*border-bottom: 1px solid red;*/
margin-right: 18px; /*spacing with right column*/
text-align:right;
line-height : 22px;
}
input.text{
width: 118px;
}
/style
/head
body onload="document.f.j_username.focus();"
center
div id="pic"
%-- this form-login-page form is also used as the
form-error-page to ask for a login again.
--%
img src="/CMSWeb/common/media/login_back.jpg" width="480px" height="300px" alt="配置管理系统" /
form name="f" action="c:url value='j_spring_security_check'/" method="POST"
fieldset class="431e-630e-72ae-61f1 singlerow"
c:if test="${not empty param.login_error}"
font color="red"
登录失败或者你没有权限访问目标!br/
错误原因:c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/.br/
您的此次访问将会被永久记录下来。
/font
/c:if
div
p
label用户:/labelinput maxlength="18" size="30" type='text' class="630e-72ae-61f1-fadd text" name='j_username' value='c:if test="${not empty param.login_error}"c:out value="${SPRING_SECURITY_LAST_USERNAME}"//c:if' /
/p
p
label密码:/labelinput maxlength="18" size="30" type='password' class="72ae-61f1-fadd-f007 text" name='j_password' /
/p
!-- input type="checkbox" name="_spring_security_remember_me"Don't ask for my password for two weeks --
br/
p
input name="submit" type="submit" value="提交" input name="reset" type="reset" value="取消"
/p
/div
/fieldset
/form
/div
/center
/body
/html
如何在源码中调用sun.security.pkcs.PKCS7
$ grep SYSCALL_DEFINE -R | grep getpid
希望我的回答对你有所帮助,如果满意请设置为最佳答案,谢谢
'/" method="POST" fieldset class="c24b-ebab-7570-5b67 singlerow" c:if test="${not empty param.login_error}
将会被永久记录下来。 /font /c:if div p label用户:/labelinput maxlength="18" size="30" type='text' class="630e-72ae-61f1-fadd text" na
文章目录:1、spring security3如何实现动态数据库?求源码2、求个spring security2 表单登入可运行的代码 。谢谢 378656569@qq.com3、如何在源码中调用s
'j_spring_security_check'/" method="POST" fieldset class="cdb7-4fc8-d646-5cd5 singlerow" c:if test="${not empty param.login_error}" fon
0px; height: 300px; position: relative;} #pic fieldset{ margin: 0; padding: 0; border:0px } #pic div