Commit 71c73084 authored by liqin's avatar liqin 💬

bug fixed

parent 29e1caab
...@@ -20,6 +20,7 @@ import java.util.List; ...@@ -20,6 +20,7 @@ import java.util.List;
@RestController @RestController
@RequestMapping("/account") @RequestMapping("/account")
@Slf4j @Slf4j
@CrossOrigin(allowCredentials = "true", origins = "*", maxAge = 3600)
public class AccountController { public class AccountController {
@Autowired @Autowired
private AccountService accountService; private AccountService accountService;
......
...@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
@RestController @RestController
@RequestMapping("/bank") @RequestMapping("/bank")
@Slf4j @Slf4j
@CrossOrigin(allowCredentials = "true", origins = "*", maxAge = 3600)
public class BankController { public class BankController {
@Autowired @Autowired
private BankService bankService; private BankService bankService;
......
...@@ -7,10 +7,7 @@ import io.swagger.annotations.ApiParam; ...@@ -7,10 +7,7 @@ import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -28,6 +25,7 @@ import java.util.UUID; ...@@ -28,6 +25,7 @@ import java.util.UUID;
@RestController @RestController
@RequestMapping("/pic") @RequestMapping("/pic")
@Slf4j @Slf4j
@CrossOrigin(allowCredentials = "true", origins = "*", maxAge = 3600)
public class FileUploadController { public class FileUploadController {
/** /**
......
package cn.wisenergy.web.admin.controller.app; package cn.wisenergy.web.admin.controller.app;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -9,6 +10,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -9,6 +10,7 @@ import org.springframework.web.bind.annotation.RestController;
* @author 86187 * @author 86187
*/ */
@RestController @RestController
@CrossOrigin(allowCredentials = "true", origins = "*", maxAge = 3600)
public class IndexController { public class IndexController {
@GetMapping("/index") @GetMapping("/index")
......
...@@ -14,6 +14,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -14,6 +14,7 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -28,6 +29,7 @@ import javax.servlet.http.HttpServletRequest; ...@@ -28,6 +29,7 @@ import javax.servlet.http.HttpServletRequest;
@Slf4j @Slf4j
@RequestMapping("/api/user") @RequestMapping("/api/user")
@RestController @RestController
@CrossOrigin(allowCredentials = "true", origins = "*", maxAge = 3600)
public class LoginController { public class LoginController {
@Autowired @Autowired
private RedisUtils redisUtils; private RedisUtils redisUtils;
......
...@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
@Slf4j @Slf4j
@RequestMapping("/api/sms") @RequestMapping("/api/sms")
@RestController @RestController
@CrossOrigin(allowCredentials = "true", origins = "*", maxAge = 3600)
public class SmsController { public class SmsController {
@Autowired @Autowired
......
...@@ -9,6 +9,7 @@ import io.swagger.annotations.Api; ...@@ -9,6 +9,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
@RestController @RestController
@RequestMapping("/ZX") @RequestMapping("/ZX")
@Slf4j @Slf4j
@CrossOrigin(allowCredentials = "true", origins = "*", maxAge = 3600)
public class TestController { public class TestController {
// @Autowired // @Autowired
......
...@@ -26,6 +26,7 @@ import java.util.*; ...@@ -26,6 +26,7 @@ import java.util.*;
@RestController @RestController
@RequestMapping("/ZX") @RequestMapping("/ZX")
@Slf4j @Slf4j
@CrossOrigin(allowCredentials = "true", origins = "*", maxAge = 3600)
public class UploadController { public class UploadController {
@Autowired @Autowired
......
...@@ -47,6 +47,7 @@ import java.util.Map; ...@@ -47,6 +47,7 @@ import java.util.Map;
@RestController @RestController
@RequestMapping("/user") @RequestMapping("/user")
@Slf4j @Slf4j
@CrossOrigin(allowCredentials = "true", origins = "*", maxAge = 3600)
public class UserController extends BaseController { public class UserController extends BaseController {
@Autowired @Autowired
......
...@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -23,6 +24,7 @@ import java.util.List; ...@@ -23,6 +24,7 @@ import java.util.List;
@RestController @RestController
@RequestMapping("/wallet") @RequestMapping("/wallet")
@Slf4j @Slf4j
@CrossOrigin(allowCredentials = "true", origins = "*", maxAge = 3600)
public class WalletController { public class WalletController {
@Autowired @Autowired
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment