Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
inspect
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
912协同工作系统
项目监控管理工具
inspect
Commits
a4f7bfd3
提交
a4f7bfd3
authored
4月 20, 2020
作者:
马晨俊
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'lj-project' of git.yfzx.zjtys.com.cn:912-system/monitor/inspect into lj-project
上级
d2be4cfb
935b8bb8
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
8 行增加
和
5 行删除
+8
-5
.gitignore
.gitignore
+0
-1
MvcConfig.java
src/main/java/com/zjty/inspect/config/MvcConfig.java
+1
-1
EvaluationController.java
...ava/com/zjty/inspect/controller/EvaluationController.java
+1
-1
FreeMakerUtils.java
src/main/java/com/zjty/inspect/utils/FreeMakerUtils.java
+5
-1
application.properties
src/main/resources/application.properties
+1
-1
reportTemplate.ftl
src/main/resources/templates/reportTemplate.ftl
+0
-0
没有找到文件。
.gitignore
浏览文件 @
a4f7bfd3
...
...
@@ -37,4 +37,3 @@ build/
### VS Code ###
.vscode/
/src/main/resources/
src/main/java/com/zjty/inspect/config/MvcConfig.java
浏览文件 @
a4f7bfd3
...
...
@@ -32,7 +32,7 @@ public class MvcConfig extends WebMvcConfigurationSupport {
registry
.
addResourceHandler
(
"doc.html"
).
addResourceLocations
(
"classpath:/META-INF/resources/"
);
registry
.
addResourceHandler
(
"/webjars/**"
)
.
addResourceLocations
(
"classpath:/META-INF/resources/webjars/"
);
registry
.
addResourceHandler
(
"/**"
)
registry
.
addResourceHandler
(
"/
templates/
**"
)
.
addResourceLocations
(
"classpath:/META-INF/resources/templates/"
);
registry
.
addResourceHandler
(
"/static/**"
)
.
addResourceLocations
(
"classpath:/static/"
);
...
...
src/main/java/com/zjty/inspect/controller/EvaluationController.java
浏览文件 @
a4f7bfd3
...
...
@@ -194,7 +194,7 @@ public class EvaluationController {
}
else
{
wps
.
put
(
"agree"
,
"不同意"
);
}
String
w
=
FreeMakerUtils
.
parseTpl
(
"
报告模板
"
,
wps
);
String
w
=
FreeMakerUtils
.
parseTpl
(
"
reportTemplate
"
,
wps
);
if
(
w
==
null
){
return
ServerResponse
.
error
(
500
);
}
...
...
src/main/java/com/zjty/inspect/utils/FreeMakerUtils.java
浏览文件 @
a4f7bfd3
...
...
@@ -3,6 +3,8 @@ package com.zjty.inspect.utils;
import
com.zjty.inspect.entity.TechnologyContent
;
import
freemarker.template.Configuration
;
import
freemarker.template.Template
;
import
org.springframework.web.servlet.view.freemarker.FreeMarkerConfig
;
import
org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer
;
import
java.io.*
;
import
java.util.List
;
...
...
@@ -11,7 +13,9 @@ import java.util.Map;
public
class
FreeMakerUtils
{
public
static
String
parseTpl
(
String
viewName
,
Map
params
)
{
Configuration
cfg
=
SpringContextHolder
.
getBean
(
Configuration
.
class
);
// Configuration cfg = SpringContextHolder.getBean(Configuration.class);
Configuration
cfg
=
new
Configuration
();
cfg
.
setClassForTemplateLoading
(
FreeMakerUtils
.
class
,
"/templates/"
);
Template
t
=
null
;
try
{
t
=
cfg
.
getTemplate
(
viewName
+
".ftl"
);
...
...
src/main/resources/application.properties
浏览文件 @
a4f7bfd3
...
...
@@ -61,7 +61,7 @@ spring.jackson.time-zone=GMT
spring.freemarker.charset
=
UTF-8
spring.freemarker.suffix
=
.ftl
spring.freemarker.content-type
=
text/html; charset=utf-8
spring.freemarker.template-loader-path
=
classpath:/templates
spring.freemarker.template-loader-path
=
classpath:/templates
/
#spring.redis.host=127.0.0.1
##Redis\u670D\u52A1\u5668\u8FDE\u63A5\u7AEF\u53E3
#spring.redis.port=6379
...
...
src/main/resources/templates/reportTemplate.ftl
0 → 100644
浏览文件 @
a4f7bfd3
This source diff could not be displayed because it is too large. You can
view the blob
instead.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论