master
wangbing 4 years ago
parent 0cd097f65c
commit 485ccaf218

@ -9,6 +9,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
@ -434,11 +435,7 @@ public class GlobalController {
for (int i = 0; i < parameters.length; i++) { for (int i = 0; i < parameters.length; i++) {
Parameter parameter = parameters[i]; Parameter parameter = parameters[i];
if (parameter.getType() == HttpServletRequest.class) { if (BaseRequest.class.isAssignableFrom(parameter.getType())) {
arg[i] = httpServletRequest;
} else if (parameter.getType() == HttpServletResponse.class) {
arg[i] = httpServletResponse;
} else if (BaseRequest.class.isAssignableFrom(parameter.getType())) {
arg[i] = MapperUtil.toJava(data, parameter.getType()); arg[i] = MapperUtil.toJava(data, parameter.getType());
} else if (parameter.getType() == Token.class) { } else if (parameter.getType() == Token.class) {
arg[i] = LocalData.getToken(); arg[i] = LocalData.getToken();

@ -38,16 +38,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
private String[] included; private String[] included;
@Value("${r'${web.url.auth.excluded}'}") @Value("${r'${web.url.auth.excluded}'}")
private String[] excluded; private String[] excluded;
@Value("${r'${spring.mvc.static-path-pattern}'}")
private String[] staticPath;
@Value("${r'${web.url.login}'}") @Value("${r'${web.url.login}'}")
private String loginPage; private String loginPage;
@Override
public void configure(WebSecurity web) throws Exception {
web.ignoring().mvcMatchers(staticPath);
}
@Override @Override
protected void configure(HttpSecurity http) throws Exception { protected void configure(HttpSecurity http) throws Exception {
http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS) http.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)

Loading…
Cancel
Save

Powered by TurnKey Linux.