更新 springboot 和 springcloud 版本

This commit is contained in:
Shikong 2023-04-20 17:00:15 +08:00
parent eb3f125902
commit caa2668eef
8 changed files with 39 additions and 7 deletions

View File

@ -8,6 +8,7 @@
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="provider" />
<module name="kafka-01" />
<module name="consumer" />
</profile>
</annotationProcessing>

View File

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/kafka-01/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/kafka-01/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/project-01/consumer/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/project-01/consumer/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/project-01/provider/src/main/java" charset="UTF-8" />

21
kafka-01/pom.xml Normal file
View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.skcks.study.springcloud</groupId>
<artifactId>spring-cloud-study</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>cn.skcks.study.springcloud.kafka</groupId>
<artifactId>kafka-01</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

View File

@ -0,0 +1,7 @@
package cn.skcks.study.springcloud.kafka;
public class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}

View File

@ -14,12 +14,13 @@
<modules>
<module>project-01</module>
<module>kafka-01</module>
</modules>
<properties>
<java.version>1.8</java.version>
<spring-boot.version>2.4.4</spring-boot.version>
<spring-cloud.version>2020.0.2</spring-cloud.version>
<spring-boot.version>2.7.10</spring-boot.version>
<spring-cloud.version>2021.0.6</spring-cloud.version>
<spring-cloud-alibaba.version>2021.1</spring-cloud-alibaba.version>
<lombok.version>1.18.26</lombok.version>
</properties>

View File

@ -8,9 +8,9 @@ spring:
cloud:
nacos:
discovery:
server-addr: 10.10.10.20:8848
server-addr: 10.10.10.200:8848
seaweed-fs:
url: http://10.10.10.100:18333
url: http://10.10.10.200:18333
access-key: fb64fcb7bbe24883b2b49c1e8d1bd02e
secret-key: b40afae726aa7e2783e47b9af60f6c6f

View File

@ -58,7 +58,7 @@ public class ApplicationTest {
@Test
void upload() throws Exception{
checkBucket();
String f = "D:\\Temp\\video.zip";
String f = "D:\\Temp\\temp.zip";
Path path = Paths.get(f);
try(InputStream is = Files.newInputStream(path)){
mc.putObject(PutObjectArgs.builder()
@ -73,7 +73,7 @@ public class ApplicationTest {
@Test
void uploadZipFile() throws Exception {
checkBucket();
String path = "D:\\Temp\\video.zip";
String path = "D:\\Temp\\temp.zip";
try(ZipFile zipFile = new ZipFile(path)){
ZipInputStream zipInputStream = new ZipInputStream(new BufferedInputStream(Files.newInputStream(Paths.get(path))));
ZipEntry zipEntry;

View File

@ -7,4 +7,4 @@ spring:
cloud:
nacos:
discovery:
server-addr: 10.10.10.20:8848
server-addr: 10.10.10.200:8848