From fdaf3bb08e1a6be141aae439644aa84440898741 Mon Sep 17 00:00:00 2001 From: "Leo.Cai" <1836630213@qq.com> Date: Thu, 10 Oct 2019 10:57:13 +0800 Subject: [PATCH 1/7] =?UTF-8?q?frm=E8=A1=A8=E5=8D=95=E5=AF=BC=E5=87=BAapi?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/fr/io/ExportApi_frm.java | 122 +++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 src/main/java/com/fr/io/ExportApi_frm.java diff --git a/src/main/java/com/fr/io/ExportApi_frm.java b/src/main/java/com/fr/io/ExportApi_frm.java new file mode 100644 index 0000000..eb476cc --- /dev/null +++ b/src/main/java/com/fr/io/ExportApi_frm.java @@ -0,0 +1,122 @@ +package com.fr.io; + +import com.fr.base.operator.common.CommonOperator; +import com.fr.chart.activator.ChartBaseActivator; +import com.fr.cluster.engine.activator.standalone.StandaloneModeActivator; +import com.fr.config.activator.BaseDBActivator; +import com.fr.config.activator.ConfigurationActivator; +import com.fr.env.operator.CommonOperatorImpl; +import com.fr.form.export.FormToWBExecutor; +import com.fr.general.I18nResource; +import com.fr.io.TemplateWorkBookIO; +import com.fr.io.exporter.ImageExporter; +import com.fr.io.exporter.PDFExporter; +import com.fr.io.exporter.excel.stream.StreamExcel2007Exporter; +import com.fr.main.impl.WorkBook; +import com.fr.main.workbook.ResultWorkBook; +import com.fr.module.Module; +import com.fr.module.tool.ActivatorToolBox; +import com.fr.report.ReportActivator; +import com.fr.report.RestrictionActivator; +import com.fr.report.module.ReportBaseActivator; +import com.fr.report.write.WriteActivator; +import com.fr.scheduler.SchedulerActivator; +import com.fr.stable.WriteActor; +import com.fr.store.StateServerActivator; +import com.fr.workspace.simple.SimpleWork; + +import java.io.File; +import java.io.FileOutputStream; + +public class ExportApi_frm { + public static void main(String[] args) { + // 定义报表运行环境,用于执行报表 + Module module = ActivatorToolBox.simpleLink(new BaseDBActivator(), + new ConfigurationActivator(), + new StandaloneModeActivator(), + new StateServerActivator(), + new SchedulerActivator(), + new ReportBaseActivator(), + new RestrictionActivator(), + new ReportActivator(), + new WriteActivator(), + new ChartBaseActivator()); + SimpleWork.supply(CommonOperator.class, new CommonOperatorImpl()); + String envpath = "C:\\Users\\hipsh\\Desktop\\apache-tomcat-8.5.38-10.0\\webapps\\webroot\\WEB-INF\\";//工程路径 + SimpleWork.checkIn(envpath); + I18nResource.getInstance(); + module.start(); + + +// ResultWorkBook rworkbook = null; + try { + // 导出cpt,未执行模板工作薄 + +// WorkBook workbook = (WorkBook) TemplateWorkBookIO +// .readTemplateWorkBook("测试模板.frm"); + // 获取报表参数并设置值,导出内置数据集时数据集会根据参数值查询出结果从而转为内置数据集 +// Parameter[] parameters = workbook.getParameters(); +// parameters[0].setValue("华东"); + // 定义parametermap用于执行报表,将执行后的结果工作薄保存为rworkBook + java.util.Map parameterMap = new java.util.HashMap(); + parameterMap.put("aa", "1"); +// for (int i = 0; i < parameters.length; i++) { +// parameterMap.put(parameters[i].getName(), parameters[i] +// .getValue()); +// } + //导出frm时用这个 + ResultWorkBook re = FormToWBExecutor.executeForm("test.frm",parameterMap); + // 定义输出流 + FileOutputStream outputStream; +// // 将未执行模板工作薄导出为内置数据集模板 +// outputStream = new FileOutputStream(new File("/Users//susie//Downloads//EmbExport.cpt")); +// EmbeddedTableDataExporter templateExporter = new EmbeddedTableDataExporter(); +// templateExporter.export(outputStream, workbook); +// // 将模板工作薄导出模板文件,在导出前您可以编辑导入的模板工作薄,可参考报表调用章节 +// outputStream = new FileOutputStream(new File("/Users//susie//Downloads//TmpExport.cpt")); +// ((WorkBook) workbook).export(outputStream); +// // 将结果工作薄导出为2003Excel文件 +// outputStream = new FileOutputStream(new File("/Users//susie//Downloads//ExcelExport.xls")); +// ExcelExporter ExcelExport = new ExcelExporter(); +// ExcelExport.export(outputStream, workbook.execute(parameterMap, new WriteActor())); + // 将结果工作薄导出为Excel文件 + outputStream = new FileOutputStream(new File("C:\\FTPServer\\1528.xlsx")); + StreamExcel2007Exporter ExcelExport1 = new StreamExcel2007Exporter(); + //ResultWorkBook re = FSFormletHandler.executeForm("calendar.frm",parameterMap); + + //ResultWorkBook re = FSFormletHandler.executeForm("test.frm",parameterMap); + // ExcelExport1.export(outputStream, workbook.execute(parameterMap, new WriteActor())); + ExcelExport1.export(outputStream,re); +// // 将结果工作薄导出为Word文件 +// outputStream = new FileOutputStream(new File("/Users//susie//Downloads//WordExport.doc")); +// WordExporter WordExport = new WordExporter(); +// WordExport.export(outputStream, workbook.execute(parameterMap, new WriteActor())); +// // 将结果工作薄导出为Pdf文件 + outputStream = new FileOutputStream(new File("C:\\FTPServer\\PdfExport.pdf")); + PDFExporter PdfExport = new PDFExporter(); + PdfExport.export(outputStream, re); +// // 将结果工作薄导出为Txt文件(txt文件本身不支持表格、图表等,被导出模板一般为明细表) +// outputStream = new FileOutputStream(new File("/Users//susie//Downloads//TxtExport.txt")); +// TextExporter TxtExport = new TextExporter(); +// TxtExport.export(outputStream, workbook.execute(parameterMap, new WriteActor())); +// // 将结果工作薄导出为Csv文件 +// outputStream = new FileOutputStream(new File("/Users//susie//Downloads//CsvExport.csv")); +// CSVExporter CsvExport = new CSVExporter(); +// CsvExport.export(outputStream, workbook.execute(parameterMap, new WriteActor())); +// //将结果工作薄导出为SVG文件 +// outputStream = new FileOutputStream(new File("/Users//susie//Downloads//SvgExport.svg")); +// SVGExporter SvgExport = new SVGExporter(); +// SvgExport.export(outputStream, workbook.execute(parameterMap, new WriteActor())); +// //将结果工作薄导出为image文件 + outputStream = new FileOutputStream(new File("C:\\FTPServer\\PngExport.png")); + ImageExporter ImageExport = new ImageExporter(); + ImageExport.export(outputStream, re); + outputStream.close(); + module.stop(); + } catch (Exception e) { + e.printStackTrace(); + } finally { + SimpleWork.checkOut(); + } + } +} \ No newline at end of file From ade1863442681e0a518c4c75142c8bbd656da979 Mon Sep 17 00:00:00 2001 From: "Leo.Cai" <1836630213@qq.com> Date: Thu, 10 Oct 2019 13:50:59 +0800 Subject: [PATCH 2/7] =?UTF-8?q?1.=E4=BB=A3=E7=A0=81=E6=94=B9=E4=B8=BAutf-8?= =?UTF-8?q?=E7=BC=96=E7=A0=81=202.=E5=8E=BB=E6=8E=89=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E7=9A=84=E6=B3=A8=E9=87=8A=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/fr/io/ExportApi_frm.java | 60 +++------------------- 1 file changed, 7 insertions(+), 53 deletions(-) diff --git a/src/main/java/com/fr/io/ExportApi_frm.java b/src/main/java/com/fr/io/ExportApi_frm.java index eb476cc..ba15d77 100644 --- a/src/main/java/com/fr/io/ExportApi_frm.java +++ b/src/main/java/com/fr/io/ExportApi_frm.java @@ -30,7 +30,7 @@ import java.io.FileOutputStream; public class ExportApi_frm { public static void main(String[] args) { - // 定义报表运行环境,用于执行报表 + // 瀹氫箟鎶ヨ〃杩愯鐜,鐢ㄤ簬鎵ц鎶ヨ〃 Module module = ActivatorToolBox.simpleLink(new BaseDBActivator(), new ConfigurationActivator(), new StandaloneModeActivator(), @@ -42,72 +42,26 @@ public class ExportApi_frm { new WriteActivator(), new ChartBaseActivator()); SimpleWork.supply(CommonOperator.class, new CommonOperatorImpl()); - String envpath = "C:\\Users\\hipsh\\Desktop\\apache-tomcat-8.5.38-10.0\\webapps\\webroot\\WEB-INF\\";//工程路径 + String envpath = "C:\\Users\\hipsh\\Desktop\\apache-tomcat-8.5.38-10.0\\webapps\\webroot\\WEB-INF\\";//宸ョ▼璺緞 SimpleWork.checkIn(envpath); I18nResource.getInstance(); module.start(); - - -// ResultWorkBook rworkbook = null; try { - // 导出cpt,未执行模板工作薄 - -// WorkBook workbook = (WorkBook) TemplateWorkBookIO -// .readTemplateWorkBook("测试模板.frm"); - // 获取报表参数并设置值,导出内置数据集时数据集会根据参数值查询出结果从而转为内置数据集 -// Parameter[] parameters = workbook.getParameters(); -// parameters[0].setValue("华东"); - // 定义parametermap用于执行报表,将执行后的结果工作薄保存为rworkBook + java.util.Map parameterMap = new java.util.HashMap(); parameterMap.put("aa", "1"); -// for (int i = 0; i < parameters.length; i++) { -// parameterMap.put(parameters[i].getName(), parameters[i] -// .getValue()); -// } - //导出frm时用这个 ResultWorkBook re = FormToWBExecutor.executeForm("test.frm",parameterMap); - // 定义输出流 + // 瀹氫箟杈撳嚭娴 FileOutputStream outputStream; -// // 将未执行模板工作薄导出为内置数据集模板 -// outputStream = new FileOutputStream(new File("/Users//susie//Downloads//EmbExport.cpt")); -// EmbeddedTableDataExporter templateExporter = new EmbeddedTableDataExporter(); -// templateExporter.export(outputStream, workbook); -// // 将模板工作薄导出模板文件,在导出前您可以编辑导入的模板工作薄,可参考报表调用章节 -// outputStream = new FileOutputStream(new File("/Users//susie//Downloads//TmpExport.cpt")); -// ((WorkBook) workbook).export(outputStream); -// // 将结果工作薄导出为2003Excel文件 -// outputStream = new FileOutputStream(new File("/Users//susie//Downloads//ExcelExport.xls")); -// ExcelExporter ExcelExport = new ExcelExporter(); -// ExcelExport.export(outputStream, workbook.execute(parameterMap, new WriteActor())); - // 将结果工作薄导出为Excel文件 + // 灏嗙粨鏋滃伐浣滆杽瀵煎嚭涓篍xcel鏂囦欢 outputStream = new FileOutputStream(new File("C:\\FTPServer\\1528.xlsx")); StreamExcel2007Exporter ExcelExport1 = new StreamExcel2007Exporter(); - //ResultWorkBook re = FSFormletHandler.executeForm("calendar.frm",parameterMap); - - //ResultWorkBook re = FSFormletHandler.executeForm("test.frm",parameterMap); - // ExcelExport1.export(outputStream, workbook.execute(parameterMap, new WriteActor())); ExcelExport1.export(outputStream,re); -// // 将结果工作薄导出为Word文件 -// outputStream = new FileOutputStream(new File("/Users//susie//Downloads//WordExport.doc")); -// WordExporter WordExport = new WordExporter(); -// WordExport.export(outputStream, workbook.execute(parameterMap, new WriteActor())); -// // 将结果工作薄导出为Pdf文件 + // 灏嗙粨鏋滃伐浣滆杽瀵煎嚭涓篜df鏂囦欢 outputStream = new FileOutputStream(new File("C:\\FTPServer\\PdfExport.pdf")); PDFExporter PdfExport = new PDFExporter(); PdfExport.export(outputStream, re); -// // 将结果工作薄导出为Txt文件(txt文件本身不支持表格、图表等,被导出模板一般为明细表) -// outputStream = new FileOutputStream(new File("/Users//susie//Downloads//TxtExport.txt")); -// TextExporter TxtExport = new TextExporter(); -// TxtExport.export(outputStream, workbook.execute(parameterMap, new WriteActor())); -// // 将结果工作薄导出为Csv文件 -// outputStream = new FileOutputStream(new File("/Users//susie//Downloads//CsvExport.csv")); -// CSVExporter CsvExport = new CSVExporter(); -// CsvExport.export(outputStream, workbook.execute(parameterMap, new WriteActor())); -// //将结果工作薄导出为SVG文件 -// outputStream = new FileOutputStream(new File("/Users//susie//Downloads//SvgExport.svg")); -// SVGExporter SvgExport = new SVGExporter(); -// SvgExport.export(outputStream, workbook.execute(parameterMap, new WriteActor())); -// //将结果工作薄导出为image文件 + //灏嗙粨鏋滃伐浣滆杽瀵煎嚭涓篿mage鏂囦欢 outputStream = new FileOutputStream(new File("C:\\FTPServer\\PngExport.png")); ImageExporter ImageExport = new ImageExporter(); ImageExport.export(outputStream, re); From fb25c44e629f888714ab8599e41d4e4d7487e4bc Mon Sep 17 00:00:00 2001 From: "Leo.Cai" <1836630213@qq.com> Date: Thu, 10 Oct 2019 13:55:55 +0800 Subject: [PATCH 3/7] =?UTF-8?q?1.=E4=BB=A3=E7=A0=81=E6=94=B9=E4=B8=BAutf-8?= =?UTF-8?q?=E7=BC=96=E7=A0=81=202.=E5=8E=BB=E6=8E=89=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/fr/io/ExportApi_frm.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/fr/io/ExportApi_frm.java b/src/main/java/com/fr/io/ExportApi_frm.java index ba15d77..4b13c53 100644 --- a/src/main/java/com/fr/io/ExportApi_frm.java +++ b/src/main/java/com/fr/io/ExportApi_frm.java @@ -57,11 +57,11 @@ public class ExportApi_frm { outputStream = new FileOutputStream(new File("C:\\FTPServer\\1528.xlsx")); StreamExcel2007Exporter ExcelExport1 = new StreamExcel2007Exporter(); ExcelExport1.export(outputStream,re); - // 灏嗙粨鏋滃伐浣滆杽瀵煎嚭涓篜df鏂囦欢 + // 灏嗙粨鏋滃伐浣滆杽瀵煎嚭涓篜DF鏂囦欢 outputStream = new FileOutputStream(new File("C:\\FTPServer\\PdfExport.pdf")); PDFExporter PdfExport = new PDFExporter(); PdfExport.export(outputStream, re); - //灏嗙粨鏋滃伐浣滆杽瀵煎嚭涓篿mage鏂囦欢 + //灏嗙粨鏋滃伐浣滆杽瀵煎嚭涓篒mage鏂囦欢 outputStream = new FileOutputStream(new File("C:\\FTPServer\\PngExport.png")); ImageExporter ImageExport = new ImageExporter(); ImageExport.export(outputStream, re); From 745b53362c2f87470feb82dc209ca01115c2d4ed Mon Sep 17 00:00:00 2001 From: "Leo.Cai" <1836630213@qq.com> Date: Mon, 14 Oct 2019 09:35:33 +0800 Subject: [PATCH 4/7] =?UTF-8?q?http://www.finedevelop.com:2016/browse/DEMO?= =?UTF-8?q?-2670=20=E6=96=B0=E5=A2=9E10.0=E4=BB=8E=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E8=AF=BB=E5=8F=96frm=E5=86=B3=E7=AD=96=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/demo/ReadfrmFromDatabase.java | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 src/main/java/com/fr/demo/ReadfrmFromDatabase.java diff --git a/src/main/java/com/fr/demo/ReadfrmFromDatabase.java b/src/main/java/com/fr/demo/ReadfrmFromDatabase.java new file mode 100644 index 0000000..799d44e --- /dev/null +++ b/src/main/java/com/fr/demo/ReadfrmFromDatabase.java @@ -0,0 +1,58 @@ +package com.fr.demo; + +import com.fr.io.utils.ResourceIOUtils; +import com.fr.web.weblet.Formlet; +import com.fr.form.main.Form; +import javax.servlet.http.HttpServletRequest; +import com.fr.log.FineLoggerFactory; +import java.io.InputStream; +import java.sql.Blob; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.Map; + + + +public class ReadfrmFromDatabase extends Formlet { + + + public Form createForm(HttpServletRequest reportletRequest) { + + Form form= new Form(); + String name = reportletRequest.getParameter("reportname").toString(); + try { + // 定义数据连接(根据你实际数据库信息进行修改) + String driver = "com.mysql.jdbc.Driver"; + String url = "jdbc:mysql://localhost:3306/test"; + String user = "root"; + String pass = "123456"; + Class.forName(driver); + Connection conn = DriverManager.getConnection(url, user, pass); + // 从数据库中读模板 + String sql = "select B from report where A = '" + name + + "'"; + Statement smt = conn.createStatement(); + ResultSet rs = smt.executeQuery(sql); + while (rs.next()) { + Blob blob = rs.getBlob(1); + FineLoggerFactory.getLogger().info(blob.toString()); + InputStream ins = blob.getBinaryStream(); + form.readStream(ins); + } + } catch (Exception e) { + e.printStackTrace(); + } + System.out.println(ResourceIOUtils.getRealPath("assets")); + return form; + } + + @Override + public void setParameterMap(Map arg0) { + // TODO Auto-generated method stub + + } + + +} \ No newline at end of file From 397bfa1d663de3c677ffd95a9c867756b698c70a Mon Sep 17 00:00:00 2001 From: "Leo.Cai" <1836630213@qq.com> Date: Mon, 14 Oct 2019 09:52:37 +0800 Subject: [PATCH 5/7] =?UTF-8?q?http://www.finedevelop.com:2016/browse/DEMO?= =?UTF-8?q?-2670=20=E6=96=B0=E5=A2=9E10.0=E4=BB=8E=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=AF=BB=E5=8F=96frm=E5=86=B3=E7=AD=96=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=EF=BC=8C=E7=BC=96=E7=A0=81=E6=A0=BC=E5=BC=8F=E6=94=B9=E4=B8=BA?= =?UTF-8?q?utf-8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/fr/demo/ReadfrmFromDatabase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/fr/demo/ReadfrmFromDatabase.java b/src/main/java/com/fr/demo/ReadfrmFromDatabase.java index 799d44e..5180fee 100644 --- a/src/main/java/com/fr/demo/ReadfrmFromDatabase.java +++ b/src/main/java/com/fr/demo/ReadfrmFromDatabase.java @@ -23,14 +23,14 @@ public class ReadfrmFromDatabase extends Formlet { Form form= new Form(); String name = reportletRequest.getParameter("reportname").toString(); try { - // 定义数据连接(根据你实际数据库信息进行修改) + // 瀹氫箟鏁版嵁杩炴帴(鏍规嵁浣犲疄闄呮暟鎹簱淇℃伅杩涜淇敼) String driver = "com.mysql.jdbc.Driver"; String url = "jdbc:mysql://localhost:3306/test"; String user = "root"; String pass = "123456"; Class.forName(driver); Connection conn = DriverManager.getConnection(url, user, pass); - // 从数据库中读模板 + // 浠庢暟鎹簱涓妯℃澘 String sql = "select B from report where A = '" + name + "'"; Statement smt = conn.createStatement(); From 2bf2dd090cfbdce7db015891aad11838b5a2fa36 Mon Sep 17 00:00:00 2001 From: zack Date: Tue, 15 Oct 2019 15:38:08 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=20?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E6=8E=A5=E5=8F=A3=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/IndependentChartProviderImpl.java | 23 ++++++++++++++----- .../chart/IndependentChartUIProviderImpl.java | 5 ++++ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/fr/plugin/chart/IndependentChartProviderImpl.java b/src/main/java/com/fr/plugin/chart/IndependentChartProviderImpl.java index bd1b741..7d9b6f8 100644 --- a/src/main/java/com/fr/plugin/chart/IndependentChartProviderImpl.java +++ b/src/main/java/com/fr/plugin/chart/IndependentChartProviderImpl.java @@ -1,9 +1,10 @@ package com.fr.plugin.chart; import com.fr.chart.chartattr.Chart; -import com.fr.chart.fun.impl.AbstractIndependentChartProvider; +import com.fr.chart.fun.impl.AbstractIndependentChartsProvider; +import com.fr.stable.StringUtils; -public class IndependentChartProviderImpl extends AbstractIndependentChartProvider { +public class IndependentChartProviderImpl extends AbstractIndependentChartsProvider { @Override public void init() { @@ -15,12 +16,22 @@ public class IndependentChartProviderImpl extends AbstractIndependentChartProvid } @Override - public String getChartName() { - return ""; + public Chart[] getChartTypes() { + return null; } @Override - public Chart[] getChartTypes() { - return null; + public String[] getRequiredJS() { + return new String[0]; + } + + @Override + public String getWrapperName() { + return StringUtils.EMPTY; + } + + @Override + public int currentAPILevel() { + return 0; } } \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/chart/IndependentChartUIProviderImpl.java b/src/main/java/com/fr/plugin/chart/IndependentChartUIProviderImpl.java index 9445e2d..140b6ea 100644 --- a/src/main/java/com/fr/plugin/chart/IndependentChartUIProviderImpl.java +++ b/src/main/java/com/fr/plugin/chart/IndependentChartUIProviderImpl.java @@ -15,6 +15,11 @@ public class IndependentChartUIProviderImpl extends AbstractExtendedChartUIProvi return null; } + @Override + public String[] getDemoImagePath() { + return new String[0]; + } + @Override public String getIconPath() { return ""; From 0fee1eaab2e6127095883a6cfdff46db9670df7a Mon Sep 17 00:00:00 2001 From: "Cloud.Liu" Date: Wed, 30 Oct 2019 16:04:29 +0800 Subject: [PATCH 7/7] =?UTF-8?q?DEC-10642=20=E5=90=8E=E5=8F=B0CAS=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E5=90=8E=EF=BC=8Ctoken=E5=BA=94=E6=94=BE=E5=85=A5requ?= =?UTF-8?q?est?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/fr/FrFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/fr/FrFilter.java b/src/main/java/com/fr/FrFilter.java index c90d9b4..c272d95 100644 --- a/src/main/java/com/fr/FrFilter.java +++ b/src/main/java/com/fr/FrFilter.java @@ -81,7 +81,7 @@ public class FrFilter implements Filter { */ private void login(HttpServletRequest req, HttpServletResponse res, HttpSession session, String username) throws Exception { String token = LoginService.getInstance().login(req, res, username); - session.setAttribute(DecisionServiceConstants.FINE_AUTH_TOKEN_NAME, token); + req.setAttribute(DecisionServiceConstants.FINE_AUTH_TOKEN_NAME, token); FineLoggerFactory.getLogger().info("fr FrFilter is over with username is ###" + username); }