From e5d341086b634f9ac0345b576e6497f978a53941 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期三, 30 十一月 2022 10:38:29 +0800 Subject: [PATCH] 1 --- src/main/java/com/lf/server/helper/RsaHelper.java | 2 src/main/java/com/lf/server/controller/data/MetaController.java | 6 ++- src/main/java/com/lf/server/LfApplication.java | 11 +++++ src/main/java/com/lf/server/service/all/CommonsFileuploadService.java | 9 ++-- 说明.txt | 12 +++++ pom.xml | 23 +++++++++++ 6 files changed, 53 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index 28e7cc6..c10cd66 100644 --- a/pom.xml +++ b/pom.xml @@ -9,6 +9,8 @@ <version>2.3.6.RELEASE</version> <relativePath/> </parent> + <!--鎵撳寘鎴恮ar--> + <packaging>war</packaging> <groupId>com.lf</groupId> <artifactId>server</artifactId> @@ -27,6 +29,19 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> + <!--鎺掗櫎鍐呯疆tomcat瀹瑰櫒锛岃澶栭儴瀹瑰櫒杩愯spring-boot椤圭洰--> + <exclusions> + <exclusion> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-tomcat</artifactId> + </exclusion> + </exclusions> + </dependency> + <!--tomcat--> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-tomcat</artifactId> + <scope>provided</scope> </dependency> <!--<dependency> <groupId>org.springframework.boot</groupId> @@ -214,9 +229,17 @@ <artifactId>ucanaccess</artifactId> <version>5.0.1</version> </dependency> + <!--war:servlet--> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>javax.servlet-api</artifactId> + <version>3.1.0</version> + <scope>provided</scope> + </dependency> </dependencies> <build> + <finalName>lfserver</finalName> <plugins> <plugin> <groupId>org.springframework.boot</groupId> diff --git a/src/main/java/com/lf/server/LfApplication.java b/src/main/java/com/lf/server/LfApplication.java index 7222088..71a3bce 100644 --- a/src/main/java/com/lf/server/LfApplication.java +++ b/src/main/java/com/lf/server/LfApplication.java @@ -2,17 +2,26 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import springfox.documentation.swagger2.annotations.EnableSwagger2; /** * Land搴旂敤绋嬪簭 * @author WWW * 鎺掗櫎Security锛�, exclude = {SecurityAutoConfiguration.class, SecurityFilterAutoConfiguration.class} + * + * jar -> war锛氱户鎵� SpringBootServletInitializer锛屽疄鐜� configure 鍑芥暟 */ @EnableSwagger2 @SpringBootApplication(scanBasePackages = {"com.lf.server.*"}) -public class LfApplication { +public class LfApplication extends SpringBootServletInitializer { public static void main(String[] args) { SpringApplication.run(LfApplication.class, args); } + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder springApplicationBuilder) { + return springApplicationBuilder.sources(LfApplication.class); + } } diff --git a/src/main/java/com/lf/server/controller/data/MetaController.java b/src/main/java/com/lf/server/controller/data/MetaController.java index ac009c7..8d2e07f 100644 --- a/src/main/java/com/lf/server/controller/data/MetaController.java +++ b/src/main/java/com/lf/server/controller/data/MetaController.java @@ -43,6 +43,8 @@ @Autowired DownloadService downloadService; + private final static String EQ = "="; + @SysLog() @ApiOperation(value = "鍒嗛〉鏌ヨ骞惰繑鍥炶褰曟暟") @ApiImplicitParams({ @@ -310,7 +312,7 @@ if (StringHelper.isEmpty(guid) || StringHelper.isEmpty(pwd)) { return fail("鏂囦欢ID鍜屽瘑鐮佷笉鑳戒负绌�", null); } - if (!pwd.endsWith("=")) { + if (!pwd.endsWith(EQ)) { pwd = URLDecoder.decode(pwd, StandardCharsets.UTF_8.name()); } @@ -349,7 +351,7 @@ if (StringHelper.isEmpty(guid) || StringHelper.isEmpty(pwd)) { WebHelper.writeInfo(HttpStatus.BAD_REQUEST, "鏂囦欢ID鍜屽瘑鐮佷笉鑳戒负绌�", res); } - if (!pwd.endsWith("=")) { + if (!pwd.endsWith(EQ)) { pwd = URLDecoder.decode(pwd, StandardCharsets.UTF_8.name()); } diff --git a/src/main/java/com/lf/server/helper/RsaHelper.java b/src/main/java/com/lf/server/helper/RsaHelper.java index cf73452..f7339d2 100644 --- a/src/main/java/com/lf/server/helper/RsaHelper.java +++ b/src/main/java/com/lf/server/helper/RsaHelper.java @@ -1,6 +1,6 @@ package com.lf.server.helper; -import org.apache.tomcat.util.codec.binary.Base64; +import org.apache.commons.codec.binary.Base64; import org.springframework.core.io.ClassPathResource; import javax.crypto.Cipher; diff --git a/src/main/java/com/lf/server/service/all/CommonsFileuploadService.java b/src/main/java/com/lf/server/service/all/CommonsFileuploadService.java index 540c25c..e86abd4 100644 --- a/src/main/java/com/lf/server/service/all/CommonsFileuploadService.java +++ b/src/main/java/com/lf/server/service/all/CommonsFileuploadService.java @@ -1,15 +1,14 @@ package com.lf.server.service.all; import com.lf.server.entity.ctrl.FileInfoEntity; -import com.lf.server.entity.sys.UserEntity; import com.lf.server.helper.PathHelper; import com.lf.server.helper.StringHelper; +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.servlet.ServletFileUpload; +import org.apache.commons.fileupload.servlet.ServletRequestContext; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.tomcat.util.http.fileupload.FileItem; -import org.apache.tomcat.util.http.fileupload.disk.DiskFileItemFactory; -import org.apache.tomcat.util.http.fileupload.servlet.ServletFileUpload; -import org.apache.tomcat.util.http.fileupload.servlet.ServletRequestContext; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git "a/\350\257\264\346\230\216.txt" "b/\350\257\264\346\230\216.txt" index a575fc9..b9a64f4 100644 --- "a/\350\257\264\346\230\216.txt" +++ "b/\350\257\264\346\230\216.txt" @@ -63,7 +63,17 @@ .寮�鍙戜笂浼爏hp鏂囦欢杞崲涓篔SON鏁版嵁鎺ュ彛 .寮�鍙戣鍙朎xcel琛ㄦ牸鍔熻兘 .寮�鍙戞牴鎹疄浣撳悕绉板姩鎬佽鍙朎xcel鍔熻兘 -. + +E:\terrait\TianJin\Zip\release-1928-x64-dev\release-1928-x64\bin + +<property key="layers" value="USA Population,楂樺痉褰卞儚娉ㄨ,楂樺痉褰卞儚"/> + <property key="imgPath" value="E:/terrait/TianJin/ExportMap/ExportMap/Sources/geo.png"/> + +閾炬帴锛歨ttps://pan.baidu.com/s/1H2G34m8vIZkfeoKghEtegg?pwd=vlie +鎻愬彇鐮侊細vlie + +閾炬帴锛歨ttps://pan.baidu.com/s/10mW7dCJiBwgx5eBQy137EA +鎻愬彇鐮侊細3mwj ---------------------------------------------------------------------------------------------------- @TableField(value = "class") private String clazz; -- Gitblit v1.9.3