From 2fb1185cb6c9ee16e09b2bb9e75394b3f516fdf5 Mon Sep 17 00:00:00 2001
From: sgjj <995959152@qq.com>
Date: Tue, 22 Sep 2020 10:45:08 +0800
Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../java/net/mingsoft/config/I18NConfig.java | 31 ---------------
src/main/resources/application.yml | 2 +-
.../WEB-INF/manager/cms/category/index.ftl | 5 +--
.../WEB-INF/manager/cms/content/main.ftl | 6 +--
.../webapp/WEB-INF/manager/include/local.ftl | 39 -------------------
5 files changed, 5 insertions(+), 78 deletions(-)
delete mode 100644 src/main/java/net/mingsoft/config/I18NConfig.java
delete mode 100644 src/main/webapp/WEB-INF/manager/include/local.ftl
diff --git a/src/main/java/net/mingsoft/config/I18NConfig.java b/src/main/java/net/mingsoft/config/I18NConfig.java
deleted file mode 100644
index 9c02d473..00000000
--- a/src/main/java/net/mingsoft/config/I18NConfig.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package net.mingsoft.config;
-
-import com.jagregory.shiro.freemarker.ShiroTags;
-import freemarker.template.TemplateException;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Configuration;
-
-import javax.annotation.PostConstruct;
-import java.io.IOException;
-
-/**
- * 读取国际化配置,传递给freemker
- */
-@Configuration
-public class I18NConfig {
- @Autowired
- protected freemarker.template.Configuration configuration;
-
- @Value("${ms.local.default:zh_CN}")
- private String defaultLocal;
- @Value("$ms.local.local-messages:zh_CN,en_US}")
- private String localMessages;
-
- @PostConstruct
- public void init() throws IOException, TemplateException {
- configuration.setSharedVariable("localDefault",defaultLocal);
- configuration.setSharedVariable("localMessages",localMessages.split(","));
- }
-
-}
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 3227c0ed..525f5456 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -15,7 +15,7 @@ logging:
ms:
local:
default: zh_CN #默认语言
- local-messages: zh_CN,en_US #全部语言
+ local-language: zh_CN,en_US #全部语言
# scheme: https #解决使用代理服务器代理应用时标签解析域名依旧为http的问题
swagger:
enable: true #启用swagger文档,生产的时候务必关掉
diff --git a/src/main/webapp/WEB-INF/manager/cms/category/index.ftl b/src/main/webapp/WEB-INF/manager/cms/category/index.ftl
index 5aacd3f8..1fcd1954 100644
--- a/src/main/webapp/WEB-INF/manager/cms/category/index.ftl
+++ b/src/main/webapp/WEB-INF/manager/cms/category/index.ftl
@@ -34,8 +34,7 @@
编号
- {ms:field.typeid/}
- [field.typeid/]
+ ${'$'}{field.id}
@@ -48,7 +47,7 @@
- {{"{ms:global.url/}"+scope.row.categoryPath+"/index.html"}}
+ {{"{ms:global.url/}"+scope.row.categoryPath+"/index.html"}}
diff --git a/src/main/webapp/WEB-INF/manager/cms/content/main.ftl b/src/main/webapp/WEB-INF/manager/cms/content/main.ftl
index 9b42f527..533cf016 100644
--- a/src/main/webapp/WEB-INF/manager/cms/content/main.ftl
+++ b/src/main/webapp/WEB-INF/manager/cms/content/main.ftl
@@ -63,8 +63,7 @@
编号
- {ms:field.id/}
- [field.id/]
+ ${'$'}{field.id}
@@ -80,8 +79,7 @@
点击量
- {ms:field.hit/}
- [field.hit/]
+ ${'$'}{field.hit}
diff --git a/src/main/webapp/WEB-INF/manager/include/local.ftl b/src/main/webapp/WEB-INF/manager/include/local.ftl
deleted file mode 100644
index 2e3242e1..00000000
--- a/src/main/webapp/WEB-INF/manager/include/local.ftl
+++ /dev/null
@@ -1,39 +0,0 @@
-<#list localMessages as item>
-
-#list>
-
\ No newline at end of file