diff --git a/pom.xml b/pom.xml
index cf967cd..ae8f29a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -62,6 +62,10 @@
org.springframework.boot
spring-boot-starter-actuator
+
+ org.springframework.boot
+ spring-boot-starter-thymeleaf
+
com.baomidou
@@ -123,6 +127,13 @@
shiro-core
1.10.0
+
+
+ com.zhuozhengsoft
+ pageoffice
+ 6.4.1.2-javax
+
+
diff --git a/src/main/java/com/keyware/htey/config/PageOfficeConfig.java b/src/main/java/com/keyware/htey/config/PageOfficeConfig.java
new file mode 100644
index 0000000..2603f23
--- /dev/null
+++ b/src/main/java/com/keyware/htey/config/PageOfficeConfig.java
@@ -0,0 +1,27 @@
+package com.keyware.htey.config;
+
+import com.zhuozhengsoft.pageoffice.poserver.Server;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.web.servlet.ServletRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class PageOfficeConfig {
+
+ @Value("${posyspath}")
+ private String poSysPath;
+
+ @Bean
+ public ServletRegistrationBean pageofficeRegistrationBean() {
+ Server poserver = new Server();
+ poserver.setSysPath(poSysPath); // 设置PageOffice注册成功后,license.lic文件存放的目录
+
+ ServletRegistrationBean srb = new ServletRegistrationBean(poserver);
+ srb.addUrlMappings("/poserver.zz");
+ srb.addUrlMappings("/poclient");
+ srb.addUrlMappings("/pageoffice.js");
+ srb.addUrlMappings("/sealsetup.exe");
+ return srb;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/keyware/htey/controller/IndexController.java b/src/main/java/com/keyware/htey/controller/IndexController.java
new file mode 100644
index 0000000..9788495
--- /dev/null
+++ b/src/main/java/com/keyware/htey/controller/IndexController.java
@@ -0,0 +1,14 @@
+package com.keyware.htey.controller;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.GetMapping;
+
+@Controller
+public class IndexController {
+ @GetMapping("/")
+ public String index(Model model) {
+ model.addAttribute("message", "Hello from Spring Boot!");
+ return "index"; // 返回 templates/index.html
+ }
+}
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index e20e18f..580c03c 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -16,6 +16,12 @@ spring:
connection-timeout: 30000
maximum-pool-size: 10
minimum-idle: 5
+ thymeleaf:
+ prefix: classpath:/templates/ # 模板文件路径
+ suffix: .html # 文件后缀
+ cache: false # 开发时禁用缓存,方便调试
+ mode: HTML # 模板模式
+ encoding: UTF-8 # 文件编码
# hertzbeat暴露指标接口
management:
endpoints:
@@ -40,6 +46,8 @@ springdoc:
api-docs:
path: /v3/api-docs # OpenAPI JSON 的访问路径
enabled: true # 是否启用 OpenAPI JSON
+# pageOffice存放目录
+posyspath: D:/pageoffice
hertz:
server: http://172.16.36.140:1157
userName: admin
diff --git a/src/main/resources/templates/bootMarkPage.html b/src/main/resources/templates/bootMarkPage.html
new file mode 100644
index 0000000..84ea94b
--- /dev/null
+++ b/src/main/resources/templates/bootMarkPage.html
@@ -0,0 +1,16 @@
+
+
+
+
+ Title
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html
new file mode 100644
index 0000000..80d354e
--- /dev/null
+++ b/src/main/resources/templates/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+ Title
+
+
+
+
+ 在线打开文档
+
+
+
+
\ No newline at end of file
diff --git a/src/main/resources/templates/simpleWord.html b/src/main/resources/templates/simpleWord.html
new file mode 100644
index 0000000..18abd0c
--- /dev/null
+++ b/src/main/resources/templates/simpleWord.html
@@ -0,0 +1,24 @@
+
+
+
+
+ 最简单的打开保存文件
+
+
+
+
+
+