From b902d6b63bda8ab1204c676ef680e86d950d7586 Mon Sep 17 00:00:00 2001 From: meng <154040976@qq.com> Date: Wed, 12 Dec 2018 22:05:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B7=A8=E5=9F=9F=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/len/controller/ArticleController.java | 7 +++---- .../main/java/com/len/controller/BlogAdminController.java | 1 + .../java/com/len/controller/BlogCategoryController.java | 2 ++ .../src/main/java/com/len/controller/SignController.java | 1 + .../src/main/java/com/len/controller/TagController.java | 2 ++ 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/len-blog/src/main/java/com/len/controller/ArticleController.java b/len-blog/src/main/java/com/len/controller/ArticleController.java index 1709d10..04f99f3 100644 --- a/len-blog/src/main/java/com/len/controller/ArticleController.java +++ b/len-blog/src/main/java/com/len/controller/ArticleController.java @@ -12,10 +12,7 @@ import com.len.util.JsonUtil; import com.len.util.ReType; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import tk.mybatis.mapper.entity.Condition; import javax.servlet.http.HttpServletRequest; @@ -30,6 +27,8 @@ import java.util.List; * @email 154040976@qq.com * @date 2018-05-05 */ + +@CrossOrigin @RestController @RequestMapping("/blog") public class ArticleController { diff --git a/len-blog/src/main/java/com/len/controller/BlogAdminController.java b/len-blog/src/main/java/com/len/controller/BlogAdminController.java index f239fbc..e25dcdf 100644 --- a/len-blog/src/main/java/com/len/controller/BlogAdminController.java +++ b/len-blog/src/main/java/com/len/controller/BlogAdminController.java @@ -29,6 +29,7 @@ import java.util.stream.Collectors; *
* 博客后台业务管理 */ +@CrossOrigin @RestController @RequestMapping("/blog-admin") @Slf4j diff --git a/len-blog/src/main/java/com/len/controller/BlogCategoryController.java b/len-blog/src/main/java/com/len/controller/BlogCategoryController.java index 13fa4c0..fc43d1e 100644 --- a/len-blog/src/main/java/com/len/controller/BlogCategoryController.java +++ b/len-blog/src/main/java/com/len/controller/BlogCategoryController.java @@ -3,6 +3,7 @@ package com.len.controller; import com.len.entity.BlogCategory; import com.len.service.BlogCategoryService; 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.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -16,6 +17,7 @@ import java.util.*; * @date 2018/9/9. * @email 154040976@qq.com */ +@CrossOrigin @RestController @RequestMapping("/blog") public class BlogCategoryController { diff --git a/len-blog/src/main/java/com/len/controller/SignController.java b/len-blog/src/main/java/com/len/controller/SignController.java index 6fc4b72..aeb8f8b 100644 --- a/len-blog/src/main/java/com/len/controller/SignController.java +++ b/len-blog/src/main/java/com/len/controller/SignController.java @@ -29,6 +29,7 @@ import java.util.stream.Collectors; * @date 2018/7/25. * @email 154040976@qq.com */ +@CrossOrigin @RestController @RequestMapping("/") @Slf4j diff --git a/len-blog/src/main/java/com/len/controller/TagController.java b/len-blog/src/main/java/com/len/controller/TagController.java index e0538fb..5e332a1 100644 --- a/len-blog/src/main/java/com/len/controller/TagController.java +++ b/len-blog/src/main/java/com/len/controller/TagController.java @@ -8,6 +8,7 @@ import com.len.entity.BlogTag; import com.len.service.BlogArticleService; import com.len.service.BlogTagService; 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.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -21,6 +22,7 @@ import java.util.List; *
* 标签 */ +@CrossOrigin @RestController @RequestMapping("/blog") public class TagController extends BaseController {