更新
This commit is contained in:
parent
c9108cd74a
commit
c5e324aeed
62
pom.xml
62
pom.xml
@ -11,6 +11,7 @@
|
|||||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||||
<version>2.1.6.RELEASE</version>
|
<version>2.1.6.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter</artifactId>
|
<artifactId>spring-boot-starter</artifactId>
|
||||||
@ -41,31 +42,37 @@
|
|||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.springfox</groupId>
|
<groupId>io.springfox</groupId>
|
||||||
<artifactId>springfox-swagger2</artifactId>
|
<artifactId>springfox-swagger2</artifactId>
|
||||||
<version>2.9.2</version>
|
<version>2.9.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.springfox</groupId>
|
<groupId>io.springfox</groupId>
|
||||||
<artifactId>springfox-swagger-ui</artifactId>
|
<artifactId>springfox-swagger-ui</artifactId>
|
||||||
<version>2.9.2</version>
|
<version>2.9.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>fastjson</artifactId>
|
<artifactId>fastjson</artifactId>
|
||||||
<version>1.2.68</version>
|
<version>1.2.68</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-log4j2</artifactId>
|
<artifactId>spring-boot-starter-log4j2</artifactId>
|
||||||
<version>2.1.6.RELEASE</version>
|
<version>2.1.6.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-lang3</artifactId>
|
<artifactId>commons-lang3</artifactId>
|
||||||
<version>3.9</version>
|
<version>3.9</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.minio</groupId>
|
<groupId>io.minio</groupId>
|
||||||
<artifactId>minio</artifactId>
|
<artifactId>minio</artifactId>
|
||||||
@ -90,11 +97,66 @@
|
|||||||
<artifactId>jedis</artifactId>
|
<artifactId>jedis</artifactId>
|
||||||
<version>3.7.0</version>
|
<version>3.7.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.fastjson2</groupId>
|
<groupId>com.alibaba.fastjson2</groupId>
|
||||||
<artifactId>fastjson2</artifactId>
|
<artifactId>fastjson2</artifactId>
|
||||||
<version>2.0.9</version>
|
<version>2.0.9</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!--ureport2 依赖-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.bstek.ureport</groupId>
|
||||||
|
<artifactId>ureport2-console</artifactId>
|
||||||
|
<version>2.2.9</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- mysql驱动 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>8.0.16</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- oracle驱动 -->
|
||||||
|
<!--<dependency>
|
||||||
|
<groupId>com.oracle</groupId>
|
||||||
|
<artifactId>ojdbc6</artifactId>
|
||||||
|
<version>11.2.0.3</version>
|
||||||
|
</dependency>-->
|
||||||
|
<!-- mssql驱动 -->
|
||||||
|
<!--<dependency>
|
||||||
|
<groupId>com.microsoft.sqlserver</groupId>
|
||||||
|
<artifactId>sqljdbc4</artifactId>
|
||||||
|
<version>4.0</version>
|
||||||
|
</dependency>-->
|
||||||
|
<!-- postgresql驱动 -->
|
||||||
|
<!--<dependency>
|
||||||
|
<groupId>org.postgresql</groupId>
|
||||||
|
<artifactId>postgresql</artifactId>
|
||||||
|
</dependency>-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>druid-spring-boot-starter</artifactId>
|
||||||
|
<version>1.1.13</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
|
<version>3.1.2</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-generator</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<!-- 其他依赖... -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
|
<artifactId>httpclient</artifactId>
|
||||||
|
<version>4.5.14</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<finalName>hb-minio</finalName>
|
<finalName>hb-minio</finalName>
|
||||||
|
@ -2,13 +2,19 @@ package com.hb.config;
|
|||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.web.cors.CorsConfiguration;
|
||||||
|
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||||
|
import org.springframework.web.filter.CorsFilter;
|
||||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
public class CorsConfig {
|
public class CorsConfig {
|
||||||
|
|
||||||
@Bean
|
/**
|
||||||
|
* 前后端的跨域设置是在后端工程里使用跨域拦截器进行配置的,而添加的自定义登录拦截器是在跨域拦截器之前执行的,导致跨域拦截器失效
|
||||||
|
*/
|
||||||
|
/*@Bean
|
||||||
public WebMvcConfigurer corsConfigurer() {
|
public WebMvcConfigurer corsConfigurer() {
|
||||||
return new WebMvcConfigurer() {
|
return new WebMvcConfigurer() {
|
||||||
@Override
|
@Override
|
||||||
@ -29,5 +35,21 @@ public class CorsConfig {
|
|||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
}*/
|
||||||
|
|
||||||
|
// 让跨域配置在登录拦截器之前执行。而Filter的执行顺序大于自定义拦截器,所以改为在Filter里实现跨域的配置
|
||||||
|
// 当前跨域请求最大有效时长。这里默认1天
|
||||||
|
private static final long MAX_AGE = 24 * 60 * 60;
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public CorsFilter corsFilter() {
|
||||||
|
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||||
|
CorsConfiguration corsConfiguration = new CorsConfiguration();
|
||||||
|
corsConfiguration.addAllowedOrigin("*"); // 1 设置访问源地址
|
||||||
|
corsConfiguration.addAllowedHeader("*"); // 2 设置访问源请求头
|
||||||
|
corsConfiguration.addAllowedMethod("*"); // 3 设置访问源请求方法
|
||||||
|
corsConfiguration.setMaxAge(MAX_AGE);
|
||||||
|
source.registerCorsConfiguration("/**", corsConfiguration); // 4 对接口配置跨域设置
|
||||||
|
return new CorsFilter(source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
122
src/main/java/com/hb/config/DefaultImageProvider.java
Normal file
122
src/main/java/com/hb/config/DefaultImageProvider.java
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
package com.hb.config;
|
||||||
|
|
||||||
|
import com.bstek.ureport.exception.ReportComputeException;
|
||||||
|
import com.bstek.ureport.provider.image.ImageProvider;
|
||||||
|
import com.hb.util.MinioUtil;
|
||||||
|
import org.springframework.beans.BeansException;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.ApplicationContext;
|
||||||
|
import org.springframework.context.ApplicationContextAware;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.util.ResourceUtils;
|
||||||
|
import org.springframework.web.context.WebApplicationContext;
|
||||||
|
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.HttpURLConnection;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Jacky.gao
|
||||||
|
* @since 2017年3月6日
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class DefaultImageProvider implements ImageProvider, ApplicationContextAware {
|
||||||
|
private ApplicationContext applicationContext;
|
||||||
|
private String baseWebPath;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MinioUtil minioUtil;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InputStream getImage(String path) {
|
||||||
|
try {
|
||||||
|
if (path.startsWith(ResourceUtils.CLASSPATH_URL_PREFIX) || path.startsWith("/WEB-INF")) {
|
||||||
|
return applicationContext.getResource(path).getInputStream();
|
||||||
|
} else if (path.startsWith("http://") || path.startsWith("https://")) {
|
||||||
|
return getImageStream(path);
|
||||||
|
} else if (path.startsWith("minio:")) {
|
||||||
|
return getMinioImageStream(path);
|
||||||
|
} else if (path.startsWith(ResourceUtils.FILE_URL_PREFIX)) {
|
||||||
|
String imagePath = path.split(ResourceUtils.FILE_URL_PREFIX)[1];
|
||||||
|
return new FileInputStream(imagePath);
|
||||||
|
} else {
|
||||||
|
path = baseWebPath + path;
|
||||||
|
return new FileInputStream(path);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ReportComputeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean support(String path) {
|
||||||
|
if (path.startsWith(ResourceUtils.CLASSPATH_URL_PREFIX)) {
|
||||||
|
return true;
|
||||||
|
} else if (baseWebPath != null && (path.startsWith("/") || path.startsWith("/WEB-INF"))) {
|
||||||
|
return true;
|
||||||
|
} else if (path.startsWith(ResourceUtils.FILE_URL_PREFIX)) {
|
||||||
|
return true;
|
||||||
|
} else if ((path.startsWith("http://") || path.startsWith("https://"))) {
|
||||||
|
return true;
|
||||||
|
} else if ((path.startsWith("minio:"))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||||
|
if (applicationContext instanceof WebApplicationContext) {
|
||||||
|
WebApplicationContext context = (WebApplicationContext) applicationContext;
|
||||||
|
baseWebPath = context.getServletContext().getRealPath("/");
|
||||||
|
}
|
||||||
|
this.applicationContext = applicationContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InputStream getImageStream(String url) {
|
||||||
|
try {
|
||||||
|
url = urlEncodeChinese(url);
|
||||||
|
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
|
||||||
|
connection.setReadTimeout(5000);
|
||||||
|
connection.setConnectTimeout(5000);
|
||||||
|
connection.setRequestMethod("GET");
|
||||||
|
if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) {
|
||||||
|
InputStream inputStream = connection.getInputStream();
|
||||||
|
return inputStream;
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
System.out.println("获取网络图片出现异常,图片路径为:" + url);
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String urlEncodeChinese(String url) {
|
||||||
|
try {
|
||||||
|
Matcher matcher = Pattern.compile("[\\u4e00-\\u9fa5]").matcher(url);
|
||||||
|
String tmp = "";
|
||||||
|
while (matcher.find()) {
|
||||||
|
tmp = matcher.group();
|
||||||
|
url = url.replaceAll(tmp, URLEncoder.encode(tmp, "UTF-8"));
|
||||||
|
}
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return url.replace(" ", "%20");
|
||||||
|
}
|
||||||
|
|
||||||
|
private InputStream getMinioImageStream(String path) throws Exception {
|
||||||
|
path = path.substring(path.indexOf(":") + 1, path.length());
|
||||||
|
String[] pathArr = path.split(":");
|
||||||
|
String bucket = pathArr[0];
|
||||||
|
String fileDirName = pathArr[1];
|
||||||
|
return minioUtil.download(bucket, fileDirName);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -14,7 +14,7 @@ public class InterceptorConfig implements WebMvcConfigurer {
|
|||||||
@Override
|
@Override
|
||||||
public void addInterceptors(InterceptorRegistry registry) {
|
public void addInterceptors(InterceptorRegistry registry) {
|
||||||
//定义排除swagger访问的路径配置
|
//定义排除swagger访问的路径配置
|
||||||
String[] swaggerExcludes=new String[]{"/swagger-ui.html","/swagger-resources/**","/webjars/**", "/getPicture"};
|
String[] swaggerExcludes=new String[]{"/swagger-ui.html","/swagger-resources/**","/webjars/**", "/ureport/**"};
|
||||||
|
|
||||||
registry.addInterceptor(new MyInterceptor())
|
registry.addInterceptor(new MyInterceptor())
|
||||||
// addPathPatterns 用于添加拦截规则
|
// addPathPatterns 用于添加拦截规则
|
||||||
|
21
src/main/java/com/hb/config/MyUReportPropertyConfigurer.java
Normal file
21
src/main/java/com/hb/config/MyUReportPropertyConfigurer.java
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package com.hb.config;
|
||||||
|
|
||||||
|
import com.bstek.ureport.UReportPropertyPlaceholderConfigurer;
|
||||||
|
import org.springframework.beans.factory.config.YamlPropertiesFactoryBean;
|
||||||
|
import org.springframework.core.io.ClassPathResource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 继承UReportPropertyPlaceholderConfigurer, 装载application.yml
|
||||||
|
*
|
||||||
|
* @author liangwen
|
||||||
|
* 2023年5月24日
|
||||||
|
*/
|
||||||
|
public class MyUReportPropertyConfigurer extends UReportPropertyPlaceholderConfigurer {
|
||||||
|
|
||||||
|
public MyUReportPropertyConfigurer(String path) {
|
||||||
|
YamlPropertiesFactoryBean yaml = new YamlPropertiesFactoryBean();
|
||||||
|
yaml.setResources(new ClassPathResource(path));
|
||||||
|
this.setProperties(yaml.getObject());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
42
src/main/java/com/hb/config/UreportConfig.java
Normal file
42
src/main/java/com/hb/config/UreportConfig.java
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
package com.hb.config;
|
||||||
|
|
||||||
|
import com.bstek.ureport.console.UReportServlet;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.springframework.boot.web.servlet.ServletRegistrationBean;
|
||||||
|
import org.springframework.context.EnvironmentAware;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.ImportResource;
|
||||||
|
import org.springframework.core.env.Environment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UReport 配置
|
||||||
|
* @author liangwen
|
||||||
|
* 2023年5月24日
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
@ImportResource("classpath:ureport-console-context.xml")
|
||||||
|
public class UreportConfig implements EnvironmentAware {
|
||||||
|
|
||||||
|
private Environment environment;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setEnvironment(Environment environment) {
|
||||||
|
this.environment = environment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public MyUReportPropertyConfigurer propertyrConfigurer(){
|
||||||
|
String activeProfile = environment.getProperty("spring.profiles.active");
|
||||||
|
if(StringUtils.isNotBlank(activeProfile)){
|
||||||
|
activeProfile = "-" + activeProfile;
|
||||||
|
}
|
||||||
|
return new MyUReportPropertyConfigurer("application" + activeProfile + ".yml");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public ServletRegistrationBean<UReportServlet> buildUreportServlet(){
|
||||||
|
return new ServletRegistrationBean<UReportServlet>(new UReportServlet(), "/ureport/*");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -8,6 +8,7 @@ import java.util.*;
|
|||||||
import javax.servlet.ServletOutputStream;
|
import javax.servlet.ServletOutputStream;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.hb.listener.ProgressListener;
|
||||||
import com.hb.util.DateUtil;
|
import com.hb.util.DateUtil;
|
||||||
import com.hb.util.ServletUtils;
|
import com.hb.util.ServletUtils;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
@ -16,14 +17,18 @@ import io.swagger.annotations.*;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.tomcat.util.http.fileupload.IOUtils;
|
import org.apache.tomcat.util.http.fileupload.IOUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.HttpMethod;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
import com.hb.domain.AjaxResult;
|
import com.hb.domain.AjaxResult;
|
||||||
import com.hb.util.MinioUtil;
|
import com.hb.util.MinioUtil;
|
||||||
|
|
||||||
@Api(tags = "Minio操作接口")
|
@Api(tags = "Minio操作接口")
|
||||||
@RestController
|
@RestController
|
||||||
|
@CrossOrigin(origins = "*")
|
||||||
|
@RequestMapping("/ames/minio")
|
||||||
public class MinioController {
|
public class MinioController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -64,13 +69,60 @@ public class MinioController {
|
|||||||
})
|
})
|
||||||
@RequestMapping(value = "/uploadfile2", method = RequestMethod.POST)
|
@RequestMapping(value = "/uploadfile2", method = RequestMethod.POST)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult fileupload2(@RequestParam MultipartFile uploadfile, @RequestParam String bucket) throws Exception {
|
public AjaxResult fileupload2(@RequestParam MultipartFile uploadfile, @RequestParam String bucket) {
|
||||||
|
AjaxResult ajaxResult = new AjaxResult();
|
||||||
|
try {
|
||||||
minioUtil.createBucket(bucket);
|
minioUtil.createBucket(bucket);
|
||||||
String fileDir = buildDir();
|
String fileDir = buildDir();
|
||||||
String fileDirName = buildDirName(fileDir, uploadfile.getOriginalFilename());
|
String fileDirName = buildDirName(fileDir, uploadfile.getOriginalFilename());
|
||||||
minioUtil.uploadFile2(uploadfile, bucket, fileDirName);
|
minioUtil.uploadFile2(uploadfile, bucket, fileDirName);
|
||||||
return AjaxResult.success();
|
ajaxResult.put("code", 200);
|
||||||
|
ajaxResult.put("bucket", bucket);
|
||||||
|
ajaxResult.put("fileDirName", fileDirName);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
ajaxResult.put("code", 500);
|
||||||
|
ajaxResult.put("msg", "上传失败");
|
||||||
}
|
}
|
||||||
|
return ajaxResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*@ApiOperation("上传一个文件3")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "uploadfile", value = "MultipartFile文件对象", dataType = "__file", paramType = "form", required = true),
|
||||||
|
@ApiImplicitParam(name = "bucket", value = "桶名称", required = true),
|
||||||
|
@ApiImplicitParam(paramType = "header", name = "Authorization", value = "Bearer YOUR_TOKEN_HERE", required = true)
|
||||||
|
})
|
||||||
|
@RequestMapping(value = "/uploadfile3", method = RequestMethod.POST)
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult fileupload3(@RequestParam MultipartFile uploadfile, @RequestParam String bucket) {
|
||||||
|
AjaxResult ajaxResult = new AjaxResult();
|
||||||
|
try {
|
||||||
|
minioUtil.createBucket(bucket);
|
||||||
|
String fileDir = buildDir();
|
||||||
|
String fileDirName = buildDirName(fileDir, uploadfile.getOriginalFilename());
|
||||||
|
String putURL = minioUtil.getOneURL(fileDirName, bucket);
|
||||||
|
|
||||||
|
// 使用RestTemplate上传文件并获取进度
|
||||||
|
RestTemplate restTemplate = new RestTemplate();
|
||||||
|
ProgressListener progressListener = new ProgressListener(uploadfile.getSize(), uploadfile);
|
||||||
|
restTemplate.execute(putURL, HttpMethod.PUT, progressListener, progressListener);
|
||||||
|
|
||||||
|
// 获取上传进度
|
||||||
|
float progress = progressListener.getProgress();
|
||||||
|
|
||||||
|
ajaxResult.put("code", 200);
|
||||||
|
ajaxResult.put("bucket", bucket);
|
||||||
|
ajaxResult.put("fileDirName", fileDirName);
|
||||||
|
ajaxResult.put("progress", progress);
|
||||||
|
} catch (Exception e) {
|
||||||
|
ajaxResult.put("code", 500);
|
||||||
|
ajaxResult.put("msg", "上传失败");
|
||||||
|
}
|
||||||
|
return ajaxResult;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("递归列出一个桶中的所有文件和目录")
|
@ApiOperation("递归列出一个桶中的所有文件和目录")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ -92,39 +144,44 @@ public class MinioController {
|
|||||||
@RequestMapping(value = "/downloadFile", method = RequestMethod.GET)
|
@RequestMapping(value = "/downloadFile", method = RequestMethod.GET)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public void downloadFile(@RequestParam String bucket, @RequestParam String objectName,
|
public void downloadFile(@RequestParam String bucket, @RequestParam String objectName,
|
||||||
HttpServletResponse response) throws Exception {
|
HttpServletResponse response) {
|
||||||
|
try {
|
||||||
InputStream stream = minioUtil.download(bucket, objectName);
|
InputStream stream = minioUtil.download(bucket, objectName);
|
||||||
ServletOutputStream output = response.getOutputStream();
|
ServletOutputStream output = response.getOutputStream();
|
||||||
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(objectName.substring(objectName.lastIndexOf("/") + 1), "UTF-8"));
|
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(objectName.substring(objectName.lastIndexOf("/") + 1), "UTF-8"));
|
||||||
response.setContentType("application/octet-stream");
|
response.setContentType("application/octet-stream");
|
||||||
response.setCharacterEncoding("UTF-8");
|
response.setCharacterEncoding("UTF-8");
|
||||||
IOUtils.copy(stream, output);
|
IOUtils.copy(stream, output);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
ServletUtils.renderString(response, JSON.toJSONString(AjaxResult.error(e.getMessage())));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("下载一个文件")
|
@ApiOperation("预览文件")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "bucket", value = "桶名称", required = true),
|
@ApiImplicitParam(name = "bucket", value = "桶名称", required = true),
|
||||||
@ApiImplicitParam(name = "objectName", value = "文件全路径,例:20231215/002938/gh_03ace048af5d_344 (1) (2).jpg", required = true),
|
@ApiImplicitParam(name = "objectName", value = "文件全路径,例:20231215/002938/gh_03ace048af5d_344 (1) (2).jpg", required = true),
|
||||||
@ApiImplicitParam(paramType = "header", name = "Authorization", value = "Bearer YOUR_TOKEN_HERE", required = true)
|
@ApiImplicitParam(paramType = "header", name = "Authorization", value = "Bearer YOUR_TOKEN_HERE", required = true)
|
||||||
})
|
})
|
||||||
@RequestMapping(value = "/getPicture", method = RequestMethod.GET)
|
@RequestMapping(value = "/previewFile", method = RequestMethod.GET)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public void getLocalPicture(@RequestParam String bucket, @RequestParam String objectName,
|
public void previewFile(@RequestParam String bucket, @RequestParam String objectName,
|
||||||
HttpServletResponse response) {
|
HttpServletResponse response) {
|
||||||
try {
|
try {
|
||||||
String contentType = minioUtil.getContenType(bucket, objectName);
|
String contentType = minioUtil.getContenType(bucket, objectName);
|
||||||
// 判断文件类型是否为图片
|
// 判断文件类型是否为图片
|
||||||
boolean isImage = contentType != null && contentType.startsWith("image/");
|
/*boolean isImage = contentType != null && contentType.startsWith("image/");
|
||||||
if (!isImage) {
|
if (!isImage) {
|
||||||
ServletUtils.renderString(response, JSON.toJSONString(AjaxResult.error("文件类型不是图片,无法查看!")));
|
ServletUtils.renderString(response, JSON.toJSONString(AjaxResult.error("文件类型不是图片,无法查看!")));
|
||||||
} else {
|
} else {*/
|
||||||
InputStream stream = minioUtil.download(bucket, objectName);
|
InputStream stream = minioUtil.download(bucket, objectName);
|
||||||
ServletOutputStream output = response.getOutputStream();
|
ServletOutputStream output = response.getOutputStream();
|
||||||
//response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(objectName.substring(objectName.lastIndexOf("/") + 1), "UTF-8"));
|
//response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(objectName.substring(objectName.lastIndexOf("/") + 1), "UTF-8"));
|
||||||
//response.setContentType("application/octet-stream");
|
response.setContentType(contentType);
|
||||||
//response.setCharacterEncoding("UTF-8");
|
response.setCharacterEncoding("UTF-8");
|
||||||
IOUtils.copy(stream, output);
|
IOUtils.copy(stream, output);
|
||||||
}
|
//}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
ServletUtils.renderString(response, JSON.toJSONString(AjaxResult.error(e.getMessage())));
|
ServletUtils.renderString(response, JSON.toJSONString(AjaxResult.error(e.getMessage())));
|
||||||
|
@ -21,7 +21,15 @@ public class MyInterceptor extends HandlerInterceptorAdapter {
|
|||||||
//在请求处理之前进行拦截处理
|
//在请求处理之前进行拦截处理
|
||||||
//System.out.println("测试拦截器------preHandle------" + request.getRequestURL());
|
//System.out.println("测试拦截器------preHandle------" + request.getRequestURL());
|
||||||
//返回true表示继续执行请求,返回false表示停止执行请求;
|
//返回true表示继续执行请求,返回false表示停止执行请求;
|
||||||
String token = request.getHeader("Authorization");
|
String token = null;
|
||||||
|
String authorization = request.getHeader("Authorization");
|
||||||
|
if (StringUtils.hasText(authorization)) {
|
||||||
|
token = authorization;
|
||||||
|
}
|
||||||
|
String requestToken = (String) request.getParameter("token");
|
||||||
|
if (StringUtils.hasText(requestToken)) {
|
||||||
|
token = requestToken;
|
||||||
|
}
|
||||||
if (StringUtils.hasText(token)) {
|
if (StringUtils.hasText(token)) {
|
||||||
//验证token的合法性,根据自己的业务逻辑补充
|
//验证token的合法性,根据自己的业务逻辑补充
|
||||||
String result = HttpUtils.sendPost(Constants.VALIDATE_URL, "token=" + token);
|
String result = HttpUtils.sendPost(Constants.VALIDATE_URL, "token=" + token);
|
||||||
|
53
src/main/java/com/hb/listener/ProgressListener.java
Normal file
53
src/main/java/com/hb/listener/ProgressListener.java
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
package com.hb.listener;
|
||||||
|
|
||||||
|
import org.springframework.http.client.ClientHttpRequest;
|
||||||
|
import org.springframework.web.client.RequestCallback;
|
||||||
|
import org.springframework.web.client.ResponseExtractor;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
|
||||||
|
public class ProgressListener implements RequestCallback, ResponseExtractor<Void> {
|
||||||
|
|
||||||
|
private long totalBytes;
|
||||||
|
private long bytesRead;
|
||||||
|
private MultipartFile file;
|
||||||
|
|
||||||
|
public ProgressListener(long totalBytes, MultipartFile file) {
|
||||||
|
this.totalBytes = totalBytes;
|
||||||
|
this.file = file;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doWithRequest(ClientHttpRequest request) throws IOException {
|
||||||
|
// 将文件分块上传
|
||||||
|
InputStream inputStream = file.getInputStream();
|
||||||
|
OutputStream outputStream = request.getBody();
|
||||||
|
byte[] buffer = new byte[1024];
|
||||||
|
int bytesRead;
|
||||||
|
while ((bytesRead = inputStream.read(buffer)) != -1) {
|
||||||
|
this.bytesRead += bytesRead;
|
||||||
|
float progress = (float) this.bytesRead / totalBytes;
|
||||||
|
System.out.println("上传进度:" + progress);
|
||||||
|
// 可以在这里将进度信息保存到数据库或返回给前端
|
||||||
|
// 将分块数据写入请求体
|
||||||
|
outputStream.write(buffer, 0, bytesRead);
|
||||||
|
outputStream.flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Void extractData(org.springframework.http.client.ClientHttpResponse response) throws IOException {
|
||||||
|
// 不需要实现任何逻辑
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getProgress() {
|
||||||
|
return (float) bytesRead / totalBytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -37,12 +37,10 @@ public class MinioUtil {
|
|||||||
* 上传一个文件
|
* 上传一个文件
|
||||||
*/
|
*/
|
||||||
public void uploadFile(InputStream stream, String bucket, String objectName) throws Exception {
|
public void uploadFile(InputStream stream, String bucket, String objectName) throws Exception {
|
||||||
minioClient.putObject(PutObjectArgs.builder().bucket(bucket).object(objectName)
|
minioClient.putObject(PutObjectArgs.builder().bucket(bucket).object(objectName).stream(stream, -1, 10485760).build());
|
||||||
.stream(stream, -1, 10485760).build());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列出所有的桶
|
* 列出所有的桶
|
||||||
*/
|
*/
|
||||||
@ -59,8 +57,7 @@ public class MinioUtil {
|
|||||||
* 列出一个桶中的所有文件和目录
|
* 列出一个桶中的所有文件和目录
|
||||||
*/
|
*/
|
||||||
public List<Fileinfo> listFiles(String bucket) throws Exception {
|
public List<Fileinfo> listFiles(String bucket) throws Exception {
|
||||||
Iterable<Result<Item>> results = minioClient.listObjects(
|
Iterable<Result<Item>> results = minioClient.listObjects(ListObjectsArgs.builder().bucket(bucket).recursive(true).build());
|
||||||
ListObjectsArgs.builder().bucket(bucket).recursive(true).build());
|
|
||||||
|
|
||||||
List<Fileinfo> infos = new ArrayList<>();
|
List<Fileinfo> infos = new ArrayList<>();
|
||||||
results.forEach(r -> {
|
results.forEach(r -> {
|
||||||
@ -81,8 +78,7 @@ public class MinioUtil {
|
|||||||
* 下载一个文件
|
* 下载一个文件
|
||||||
*/
|
*/
|
||||||
public InputStream download(String bucket, String objectName) throws Exception {
|
public InputStream download(String bucket, String objectName) throws Exception {
|
||||||
InputStream stream = minioClient.getObject(
|
InputStream stream = minioClient.getObject(GetObjectArgs.builder().bucket(bucket).object(objectName).build());
|
||||||
GetObjectArgs.builder().bucket(bucket).object(objectName).build());
|
|
||||||
return stream;
|
return stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,6 +98,7 @@ public class MinioUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成直传链接
|
* 生成直传链接
|
||||||
|
*
|
||||||
* @param fileDirName
|
* @param fileDirName
|
||||||
* @param bucket
|
* @param bucket
|
||||||
* @return
|
* @return
|
||||||
@ -114,14 +111,10 @@ public class MinioUtil {
|
|||||||
|
|
||||||
Map<String, String> reqParams = new HashMap<String, String>();
|
Map<String, String> reqParams = new HashMap<String, String>();
|
||||||
reqParams.put("response-content-type", "application/json");
|
reqParams.put("response-content-type", "application/json");
|
||||||
return minioClient.getPresignedObjectUrl(
|
return minioClient.getPresignedObjectUrl(GetPresignedObjectUrlArgs.builder().method(Method.PUT) //这里必须是PUT,如果是GET的话就是文件访问地址了。如果是POST上传会报错.
|
||||||
GetPresignedObjectUrlArgs.builder()
|
|
||||||
.method(Method.PUT) //这里必须是PUT,如果是GET的话就是文件访问地址了。如果是POST上传会报错.
|
|
||||||
.bucket(bucket) // 存储桶
|
.bucket(bucket) // 存储桶
|
||||||
.object(fileDirName) // 文件名
|
.object(fileDirName) // 文件名
|
||||||
.expiry(60 * 60 * 24)
|
.expiry(60 * 60 * 24).extraQueryParams(reqParams).build());
|
||||||
.extraQueryParams(reqParams)
|
|
||||||
.build());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMinioURL(String bucket, String fileDirName) throws Exception {
|
public String getMinioURL(String bucket, String fileDirName) throws Exception {
|
||||||
@ -129,11 +122,7 @@ public class MinioUtil {
|
|||||||
String url = (String) redisTemplate.opsForValue().get(key);
|
String url = (String) redisTemplate.opsForValue().get(key);
|
||||||
if (StringUtils.isEmpty(url)) {
|
if (StringUtils.isEmpty(url)) {
|
||||||
int timeout = 60 * 60 * 24 * 7;
|
int timeout = 60 * 60 * 24 * 7;
|
||||||
GetPresignedObjectUrlArgs build = GetPresignedObjectUrlArgs.builder()
|
GetPresignedObjectUrlArgs build = GetPresignedObjectUrlArgs.builder().method(Method.GET).bucket(bucket).object(fileDirName).expiry(timeout, TimeUnit.SECONDS) //生成的预签名url可访问的有效时间,最大期限7天
|
||||||
.method(Method.GET)
|
|
||||||
.bucket(bucket)
|
|
||||||
.object(fileDirName)
|
|
||||||
.expiry(timeout, TimeUnit.SECONDS) //生成的预签名url可访问的有效时间,最大期限7天
|
|
||||||
.build();
|
.build();
|
||||||
url = minioClient.getPresignedObjectUrl(build);
|
url = minioClient.getPresignedObjectUrl(build);
|
||||||
redisTemplate.opsForValue().set(key, url);
|
redisTemplate.opsForValue().set(key, url);
|
||||||
@ -145,11 +134,7 @@ public class MinioUtil {
|
|||||||
public List<String> getMinioURLs(String bucket, String[] fileDirNames) throws Exception {
|
public List<String> getMinioURLs(String bucket, String[] fileDirNames) throws Exception {
|
||||||
List<String> urlList = new ArrayList<>();
|
List<String> urlList = new ArrayList<>();
|
||||||
for (String fileDirName : fileDirNames) {
|
for (String fileDirName : fileDirNames) {
|
||||||
GetPresignedObjectUrlArgs build = GetPresignedObjectUrlArgs.builder()
|
GetPresignedObjectUrlArgs build = GetPresignedObjectUrlArgs.builder().method(Method.GET).bucket(bucket).object(fileDirName).expiry(60 * 60 * 24 * 7) //生成的预签名url可访问的有效时间,最大期限7天
|
||||||
.method(Method.GET)
|
|
||||||
.bucket(bucket)
|
|
||||||
.object(fileDirName)
|
|
||||||
.expiry(60 * 60 * 24 * 7) //生成的预签名url可访问的有效时间,最大期限7天
|
|
||||||
.build();
|
.build();
|
||||||
String url = minioClient.getPresignedObjectUrl(build);
|
String url = minioClient.getPresignedObjectUrl(build);
|
||||||
urlList.add(url);
|
urlList.add(url);
|
||||||
@ -159,10 +144,7 @@ public class MinioUtil {
|
|||||||
|
|
||||||
public String getContenType(String bucket, String objectName) throws Exception {
|
public String getContenType(String bucket, String objectName) throws Exception {
|
||||||
// 创建StatObjectArgs对象
|
// 创建StatObjectArgs对象
|
||||||
StatObjectArgs statObjectArgs = StatObjectArgs.builder()
|
StatObjectArgs statObjectArgs = StatObjectArgs.builder().bucket(bucket).object(objectName).build();
|
||||||
.bucket(bucket)
|
|
||||||
.object(objectName)
|
|
||||||
.build();
|
|
||||||
|
|
||||||
// 获取对象信息
|
// 获取对象信息
|
||||||
StatObjectResponse statObjectResponse = minioClient.statObject(statObjectArgs);
|
StatObjectResponse statObjectResponse = minioClient.statObject(statObjectArgs);
|
||||||
@ -183,8 +165,7 @@ public class MinioUtil {
|
|||||||
String fileType = file.getContentType();
|
String fileType = file.getContentType();
|
||||||
String fileName = file.getOriginalFilename();
|
String fileName = file.getOriginalFilename();
|
||||||
|
|
||||||
minioClient.putObject(PutObjectArgs.builder()
|
minioClient.putObject(PutObjectArgs.builder().bucket(bucket) // 存储桶
|
||||||
.bucket(bucket) // 存储桶
|
|
||||||
.object(fileDirName) // 文件名
|
.object(fileDirName) // 文件名
|
||||||
.stream(file.getInputStream(), fileSize, -1) // 文件内容
|
.stream(file.getInputStream(), fileSize, -1) // 文件内容
|
||||||
.contentType(fileType) // 文件类型
|
.contentType(fileType) // 文件类型
|
||||||
|
57
src/main/resources/application-dev.yml
Normal file
57
src/main/resources/application-dev.yml
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
druid:
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://8.134.76.66:3306/hb-iot?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
|
username: root
|
||||||
|
password: hbdbadmin@
|
||||||
|
initial-size: 10
|
||||||
|
max-active: 100
|
||||||
|
min-idle: 10
|
||||||
|
max-wait: 60000
|
||||||
|
pool-prepared-statements: true
|
||||||
|
max-pool-prepared-statement-per-connection-size: 20
|
||||||
|
time-between-eviction-runs-millis: 60000
|
||||||
|
min-evictable-idle-time-millis: 300000
|
||||||
|
#Oracle需要打开注释
|
||||||
|
#validation-query: SELECT 1 FROM DUAL
|
||||||
|
test-while-idle: true
|
||||||
|
test-on-borrow: false
|
||||||
|
test-on-return: false
|
||||||
|
stat-view-servlet:
|
||||||
|
enabled: true
|
||||||
|
url-pattern: /druid/*
|
||||||
|
#login-username: admin
|
||||||
|
#login-password: admin
|
||||||
|
filter:
|
||||||
|
stat:
|
||||||
|
log-slow-sql: true
|
||||||
|
slow-sql-millis: 1000
|
||||||
|
merge-sql: false
|
||||||
|
wall:
|
||||||
|
config:
|
||||||
|
multi-statement-allow: true
|
||||||
|
|
||||||
|
|
||||||
|
##多数据源的配置,需要引用hb-dynamic-datasource
|
||||||
|
#dynamic:
|
||||||
|
# datasource:
|
||||||
|
# slave1:
|
||||||
|
# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||||
|
# url: jdbc:sqlserver://localhost:1433;DatabaseName=hb_security
|
||||||
|
# username: sa
|
||||||
|
# password: 123456
|
||||||
|
# slave2:
|
||||||
|
# driver-class-name: org.postgresql.Driver
|
||||||
|
# url: jdbc:postgresql://localhost:5432/hb_security
|
||||||
|
# username: hb
|
||||||
|
# password: 123456
|
||||||
|
|
||||||
|
#ureport配置
|
||||||
|
ureport:
|
||||||
|
disableHttpSessionReportCache: false
|
||||||
|
disableFileProvider: false
|
||||||
|
fileStoreDir: D:/ureportfiles
|
||||||
|
# fileStoreDir: /mnt/soft/ureportfiles
|
||||||
|
debug: true
|
@ -1,18 +1,29 @@
|
|||||||
server:
|
server:
|
||||||
port: 8888
|
port: 8888
|
||||||
|
ssl:
|
||||||
|
# 证书文件名
|
||||||
|
key-store: C:\Users\ccy\Desktop\cret\server.pkcs12
|
||||||
|
# 密钥口令
|
||||||
|
key-store-password: hb123456
|
||||||
|
# 证书类型
|
||||||
|
key-store-type: pkcs12
|
||||||
|
|
||||||
|
|
||||||
logging:
|
logging:
|
||||||
config: classpath:log4j2.xml
|
config: classpath:log4j2.xml
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
|
profiles:
|
||||||
|
active: dev
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
max-file-size: 100MB
|
max-file-size: 102400MB
|
||||||
max-request-size: 1000MB
|
max-request-size: 102400MB
|
||||||
|
|
||||||
# redis 配置
|
# redis 配置
|
||||||
redis:
|
redis:
|
||||||
# 地址
|
# 地址
|
||||||
host: 192.168.12.71
|
host: 192.168.15.12
|
||||||
# 端口,默认为6379
|
# 端口,默认为6379
|
||||||
port: 6379
|
port: 6379
|
||||||
# 数据库索引
|
# 数据库索引
|
||||||
@ -34,7 +45,7 @@ spring:
|
|||||||
|
|
||||||
#minio配置
|
#minio配置
|
||||||
minio:
|
minio:
|
||||||
url: https://192.168.12.71:9000 #对象存储服务的URL
|
url: https://192.168.15.12:9000 #对象存储服务的URL
|
||||||
accessKey: QVoCEhy0xek0pquP #Access key账户
|
accessKey: QVoCEhy0xek0pquP #Access key账户
|
||||||
secretKey: g89JlYE4Nnii66g6JmGRoSF7S4bc0hm6 #Secret key密码
|
secretKey: g89JlYE4Nnii66g6JmGRoSF7S4bc0hm6 #Secret key密码
|
||||||
|
|
||||||
|
BIN
src/main/resources/server.pkcs12
Normal file
BIN
src/main/resources/server.pkcs12
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user