From 802a5b83ec6b4be73e728ddbcb9f12a2bd9899f5 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Sun, 19 Jun 2022 09:31:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E6=9B=B4=E6=96=B0=E5=8C=85=E6=97=B6?= =?UTF-8?q?=E5=BF=BD=E7=95=A5prod=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=EF=BC=9B=E4=B8=80=E4=BA=9Bsql=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- renren-admin/pom.xml | 2 ++ .../modules/resource/controller/ResourceController.java | 5 ++++- renren-admin/src/main/resources/assembly/assembly.xml | 3 +++ .../src/main/resources/db/V1.2__resource_mount_addcol.sql | 3 ++- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/renren-admin/pom.xml b/renren-admin/pom.xml index d3e67e2d..140fa1bc 100644 --- a/renren-admin/pom.xml +++ b/renren-admin/pom.xml @@ -303,6 +303,8 @@ application-prod.yml + + db/*.sql diff --git a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java index aefcdf6c..1f39b7df 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java @@ -21,6 +21,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Lazy; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; @@ -40,6 +41,7 @@ import java.time.LocalDateTime; import java.util.*; import java.util.stream.Collectors; import java.util.concurrent.CompletableFuture; + /** * 资源表 * @@ -90,6 +92,7 @@ public class ResourceController { @Autowired private RestTemplate restTemplate; + @Lazy @Autowired private JdbcTemplate jdbcTemplate; @@ -303,7 +306,7 @@ public class ResourceController { "\n" + " \n" + " \n" + - String.format("%d\n %d\n",page, size) + + String.format("%d\n %d\n", page, size) + " \n" + " \n" + ""; diff --git a/renren-admin/src/main/resources/assembly/assembly.xml b/renren-admin/src/main/resources/assembly/assembly.xml index 0f844ebd..060392ef 100644 --- a/renren-admin/src/main/resources/assembly/assembly.xml +++ b/renren-admin/src/main/resources/assembly/assembly.xml @@ -52,6 +52,9 @@ *.json db/*.sql + + application-prod.yml + true ${file.separator}config diff --git a/renren-admin/src/main/resources/db/V1.2__resource_mount_addcol.sql b/renren-admin/src/main/resources/db/V1.2__resource_mount_addcol.sql index 308c4476..df5655ea 100644 --- a/renren-admin/src/main/resources/db/V1.2__resource_mount_addcol.sql +++ b/renren-admin/src/main/resources/db/V1.2__resource_mount_addcol.sql @@ -1 +1,2 @@ -ALTER TABLE `share_platform`.`t_resource_mount_apply` ADD COLUMN `resource_dto` json NULL COMMENT '挂载资源对象' AFTER `resource_id`; \ No newline at end of file +ALTER TABLE `share_platform`.`t_resource_mount_apply` ADD COLUMN `resource_dto` json NULL COMMENT '挂载资源对象'; +UPDATE `share_platform`.`t_resource_mount_apply` SET resource_dto = parameter_content; \ No newline at end of file