Add validator package, more comment
parent
de6f5159b3
commit
5a3944532c
|
@ -3,6 +3,7 @@ package com.monkeyk.sos.web.controller;
|
||||||
import com.monkeyk.sos.infrastructure.PKCEUtils;
|
import com.monkeyk.sos.infrastructure.PKCEUtils;
|
||||||
import com.monkeyk.sos.service.dto.OauthClientDetailsDto;
|
import com.monkeyk.sos.service.dto.OauthClientDetailsDto;
|
||||||
import com.monkeyk.sos.service.OauthService;
|
import com.monkeyk.sos.service.OauthService;
|
||||||
|
import com.monkeyk.sos.web.controller.validator.OauthClientDetailsDtoValidator;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.oauth2.core.AuthorizationGrantType;
|
import org.springframework.security.oauth2.core.AuthorizationGrantType;
|
||||||
import org.springframework.security.oauth2.core.oidc.OidcScopes;
|
import org.springframework.security.oauth2.core.oidc.OidcScopes;
|
||||||
|
|
|
@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
/**
|
/**
|
||||||
* 2018/4/19
|
* 2018/4/19
|
||||||
* <p>
|
* <p>
|
||||||
* starup
|
* startup
|
||||||
*
|
*
|
||||||
* @author Shengzhao Li
|
* @author Shengzhao Li
|
||||||
*/
|
*/
|
||||||
|
@ -32,10 +32,14 @@ public class SOSController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Go login
|
/**
|
||||||
|
* Go login
|
||||||
|
*/
|
||||||
@GetMapping(value = {"/login"})
|
@GetMapping(value = {"/login"})
|
||||||
public String login(Model model) {
|
public String login(Model model) {
|
||||||
LOG.info("Go to login, IP: {}", WebUtils.getIp());
|
if (LOG.isInfoEnabled()) {
|
||||||
|
LOG.info("Go to login, IP: {}", WebUtils.getIp());
|
||||||
|
}
|
||||||
return "login";
|
return "login";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.monkeyk.sos.web.controller;
|
||||||
import com.monkeyk.sos.service.dto.UserFormDto;
|
import com.monkeyk.sos.service.dto.UserFormDto;
|
||||||
import com.monkeyk.sos.service.dto.UserOverviewDto;
|
import com.monkeyk.sos.service.dto.UserOverviewDto;
|
||||||
import com.monkeyk.sos.service.UserService;
|
import com.monkeyk.sos.service.UserService;
|
||||||
|
import com.monkeyk.sos.web.controller.validator.UserFormDtoValidator;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.monkeyk.sos.web.controller;
|
package com.monkeyk.sos.web.controller.validator;
|
||||||
|
|
||||||
import com.monkeyk.sos.service.dto.OauthClientDetailsDto;
|
import com.monkeyk.sos.service.dto.OauthClientDetailsDto;
|
||||||
import com.monkeyk.sos.service.OauthService;
|
import com.monkeyk.sos.service.OauthService;
|
||||||
|
@ -11,6 +11,8 @@ import org.springframework.validation.Errors;
|
||||||
import org.springframework.validation.Validator;
|
import org.springframework.validation.Validator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 2015/5/26 15:28
|
||||||
|
*
|
||||||
* @author Shengzhao Li
|
* @author Shengzhao Li
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
|
@ -1,4 +1,4 @@
|
||||||
package com.monkeyk.sos.web.controller;
|
package com.monkeyk.sos.web.controller.validator;
|
||||||
|
|
||||||
import com.monkeyk.sos.service.dto.UserFormDto;
|
import com.monkeyk.sos.service.dto.UserFormDto;
|
||||||
import com.monkeyk.sos.domain.user.Privilege;
|
import com.monkeyk.sos.domain.user.Privilege;
|
|
@ -3,6 +3,8 @@ package com.monkeyk.sos.web.controller;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.monkeyk.sos.service.OauthService;
|
import com.monkeyk.sos.service.OauthService;
|
||||||
import com.monkeyk.sos.service.UserService;
|
import com.monkeyk.sos.service.UserService;
|
||||||
|
import com.monkeyk.sos.web.controller.validator.OauthClientDetailsDtoValidator;
|
||||||
|
import com.monkeyk.sos.web.controller.validator.UserFormDtoValidator;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Disabled;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
|
@ -3,8 +3,8 @@ package com.monkeyk.sos.web.controller.resource;
|
||||||
import com.monkeyk.sos.service.OauthService;
|
import com.monkeyk.sos.service.OauthService;
|
||||||
import com.monkeyk.sos.service.UserService;
|
import com.monkeyk.sos.service.UserService;
|
||||||
import com.monkeyk.sos.service.dto.UserJsonDto;
|
import com.monkeyk.sos.service.dto.UserJsonDto;
|
||||||
import com.monkeyk.sos.web.controller.OauthClientDetailsDtoValidator;
|
import com.monkeyk.sos.web.controller.validator.OauthClientDetailsDtoValidator;
|
||||||
import com.monkeyk.sos.web.controller.UserFormDtoValidator;
|
import com.monkeyk.sos.web.controller.validator.UserFormDtoValidator;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.junit.jupiter.api.extension.ExtendWith;
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
|
|
Loading…
Reference in New Issue