mirror of
https://gitee.com/shikong-sk/springcloud-study
synced 2024-11-09 01:51:19 +08:00
更新 springboot 和 springcloud 版本
This commit is contained in:
parent
eb3f125902
commit
caa2668eef
@ -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>
|
||||
|
@ -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
21
kafka-01/pom.xml
Normal 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>
|
@ -0,0 +1,7 @@
|
||||
package cn.skcks.study.springcloud.kafka;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello world!");
|
||||
}
|
||||
}
|
5
pom.xml
5
pom.xml
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -7,4 +7,4 @@ spring:
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 10.10.10.20:8848
|
||||
server-addr: 10.10.10.200:8848
|
||||
|
Loading…
Reference in New Issue
Block a user