From 96713cb9321d0dcc18108fc88775c753c26e2d73 Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Sat, 14 Aug 2021 14:24:41 +0800 Subject: [PATCH] =?UTF-8?q?1.3.78=E7=89=88=E6=9C=AC=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 5 --- .../jeecg/modules}/JimuReportApplication.java | 2 +- .../config/JimuReportTokenService.java | 34 +++++++++++++++++++ 3 files changed, 35 insertions(+), 6 deletions(-) delete mode 100644 .gitattributes rename jimureport-example/src/main/java/{com/example/jmreport => org/jeecg/modules}/JimuReportApplication.java (97%) create mode 100644 jimureport-example/src/main/java/org/jeecg/modules/jmreport/config/JimuReportTokenService.java diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 58102be..0000000 --- a/.gitattributes +++ /dev/null @@ -1,5 +0,0 @@ -*.js linguist-language=Java -*.css linguist-language=Java -*.html linguist-language=Java -*.vue linguist-language=Java -*.sql linguist-language=Java diff --git a/jimureport-example/src/main/java/com/example/jmreport/JimuReportApplication.java b/jimureport-example/src/main/java/org/jeecg/modules/JimuReportApplication.java similarity index 97% rename from jimureport-example/src/main/java/com/example/jmreport/JimuReportApplication.java rename to jimureport-example/src/main/java/org/jeecg/modules/JimuReportApplication.java index 081fc77..c26871e 100644 --- a/jimureport-example/src/main/java/com/example/jmreport/JimuReportApplication.java +++ b/jimureport-example/src/main/java/org/jeecg/modules/JimuReportApplication.java @@ -1,4 +1,4 @@ -package com.example.jmreport; +package org.jeecg.modules; import org.jeecg.modules.jmreport.common.util.oConvertUtils; import org.springframework.boot.SpringApplication; diff --git a/jimureport-example/src/main/java/org/jeecg/modules/jmreport/config/JimuReportTokenService.java b/jimureport-example/src/main/java/org/jeecg/modules/jmreport/config/JimuReportTokenService.java new file mode 100644 index 0000000..611779f --- /dev/null +++ b/jimureport-example/src/main/java/org/jeecg/modules/jmreport/config/JimuReportTokenService.java @@ -0,0 +1,34 @@ +package org.jeecg.modules.jmreport.config; + +import org.jeecg.modules.jmreport.api.JmReportTokenServiceI; +import org.springframework.http.HttpHeaders; +import org.springframework.stereotype.Component; + +import javax.servlet.http.HttpServletRequest; + +@Component +public class JimuReportTokenService implements JmReportTokenServiceI { + + @Override + public String getToken(HttpServletRequest request) { + return "123"; + } + + @Override + public String getUsername(String s) { + return "admin"; + } + + @Override + public Boolean verifyToken(String s) { + return true; + } + + @Override + public HttpHeaders customApiHeader() { + HttpHeaders header = new HttpHeaders(); + header.add("custom-header1", "Please set a custom value 1"); + header.add("token", "token value 2"); + return header; + } +} \ No newline at end of file