Contents
see List작성일 2016. 02. 16.
@ControllerAdvice
public class JsonpAdvice extends AbstractJsonpResponseBodyAdvice {
public JsonpAdvice() {
super("callback");
}
}
@RequestMapping(value = "${hdl.comm.login.loginCheck.ajax}",method=RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public Map<String,Object> loginCheckAjax(
ModelMap model
,@RequestParam("userId") String userId
) {
return loginService.loginCheckAjax(model,userId);
}
function callback1(data1){
if(data1.state == null){
alert("존재하지 않는 계정입니다.");
}else{
var codeValue = data1.state.codeValue;
if(codeValue == 1){
$("#login_form_submit").submit();
}else{
alert(data1.state.codeNote);
}
}
}
function checkLoginState(){
var userId = $("#userId").val();
var userPass = $("#userPasswd").val();
if(userId == ""){
alert("ID를 입력하십시오.");
return;
}else if(userPass == ""){
alert("Password를 입력하십시오.");
return;
}
$.ajax({
type : "POST",
url : '<c:url value="${checkLoginAjax}" />',
data : {
userId : userId
},
dataType : "jsonp",
jsonpCallback : "callback1",
success : function(d){
}
});
}
spring
| No | 작성일 | Title |
|---|---|---|
| 164 | 2015. 02. 24. | [ spring ] properties 동적으로 사용하기 (context:property-placeholder 및 util:properties) |
| 149 | 2015. 02. 16. | [ Spring Security ] 스프링 시큐리티 미세 접근 제한 |
| 148 | 2015. 02. 13. | [ Spring ] @Valid 어노테이션에 쉽게 매핑하기 |
| 145 | 2015. 01. 26. | [ Spring ] Transaction Isolation [ 트랜젝션 격리 ] 관리 |
| 109 | 2014. 12. 23. | [ spring ] transaction propagation [ 트랜젝션 전파 ] 관리 |
| 103 | 2014. 10. 29. | [ spring ] 스프링에서 스케줄링(Schedule) 등록하는 방법 |
| 44 | 2014. 09. 29. | [ spring security ] 스프링 시큐리티 xml 설정 |
| 43 | 2014. 09. 29. | [ spring security ] 스프링 시큐어리티 access 옵션 |
| 40 | 2014. 09. 29. | [ mybatis ] 마이바티스 map 이나 bean 을 이용하지 않고 2개이상 파라메터 전달하기 |
| 39 | 2014. 09. 26. | [ spring ] view(jsp) 에서 htmlEscape 사용하기 |