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 |
|---|---|---|
| 2005 | 2025. 11. 30. | Spring Security 6 JWT 인증 구현 |
| 2004 | 2025. 11. 30. | Spring Boot 3.x 새로운 기능 정리 |
| 1824 | 2022. 05. 24. | [ spring ] interceptor 등 스프링에서 @Autowired 인식을 못할때 |
| 421 | 2016. 08. 02. | [ spring-security ] 스프링 시큐리티 csrf (크로스도메인) 설정방법 |
| 349 | 2016. 02. 16. | [ spring ] spring4 jsonp callback |
| 346 | 2016. 02. 08. | [ spring 4 ] 스프링 4 websocket 및 stomp (채팅 및 쪽지 구현) |
| 344 | 2016. 02. 06. | [ spring-security ] 스프링 시큐리티 4 버전에서 hasRole 및 hasAnyRole 안될경우 |
| 328 | 2015. 11. 05. | [ spring security ] 스프링 시큐리티 유저정보 얻는 방법 |
| 311 | 2015. 06. 30. | [ spring ] IOException while loading persisted sessions: java.io.EOFException 해결 |
| 310 | 2015. 06. 29. | [ spring ] How To Get HTTP Request Header In spring ( 스프링에서 http header 값 가져오기) |