模块调整

This commit is contained in:
Shikong 2023-04-25 14:33:39 +08:00
parent 5ff94d641e
commit e81679a233
14 changed files with 19 additions and 21 deletions

View File

@ -9,9 +9,9 @@
<file url="file://$PROJECT_DIR$/kafka-01/kafka-01-producer/src/main/resources" charset="UTF-8" />
<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" />
<file url="file://$PROJECT_DIR$/project-01/provider/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/nacos-01/consumer/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/nacos-01/consumer/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/nacos-01/provider/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/nacos-01/provider/src/main/resources" charset="UTF-8" />
</component>
</project>

View File

@ -25,7 +25,6 @@ public class KafkaConfigTest {
private Map<String,Object> adminProperties;
private Map<String,Object> producerProperties;
private Map<String,Object> consumerProperties;
private Map<String,Object> streamsProperties;
@PostConstruct

View File

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.skcks.study.springcloud</groupId>
<artifactId>project-01</artifactId>
<artifactId>nacos-01</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

View File

@ -8,8 +8,8 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
public class Application {
public class NacosConsumer01 {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
SpringApplication.run(NacosConsumer01.class, args);
}
}

View File

@ -1,6 +1,6 @@
package cn.skcks.study.springcloud.project01.controller;
import cn.skcks.study.springcloud.project01.feign.ProviderClient;
import cn.skcks.study.springcloud.project01.feign.Nacos01ProviderClient;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.RestController;
@AllArgsConstructor
@RestController
public class ConsumerController {
private final ProviderClient providerClient;
private final Nacos01ProviderClient providerClient;
@GetMapping("/hi")
public String hi(){

View File

@ -3,10 +3,9 @@ package cn.skcks.study.springcloud.project01.feign;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@FeignClient(value = "project-01-provider")
public interface ProviderClient {
@FeignClient(value = "nacos-01-provider")
public interface Nacos01ProviderClient {
@GetMapping("/hi")
String hi(@RequestParam(value = "name",defaultValue = "Shikong",required = false) String name);
}

View File

@ -26,9 +26,9 @@ import java.util.zip.ZipInputStream;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE)
@ExtendWith(SpringExtension.class)
@Slf4j
public class ApplicationTest {
public class NacosConsumer01Test {
public static void main(String[] args) {
SpringApplication.run(ApplicationTest.class,args);
SpringApplication.run(NacosConsumer01Test.class,args);
}
private SeaweedFsConfig seaweedFsConfig;
private MinioClient mc;

View File

@ -9,7 +9,7 @@
<artifactId>spring-cloud-study</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>project-01</artifactId>
<artifactId>nacos-01</artifactId>
<packaging>pom</packaging>

View File

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.skcks.study.springcloud</groupId>
<artifactId>project-01</artifactId>
<artifactId>nacos-01</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>

View File

@ -11,9 +11,9 @@ import org.springframework.web.bind.annotation.RestController;
@SpringBootApplication
@RestController
@EnableDiscoveryClient
public class Application {
public class NacosProvider01 {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
SpringApplication.run(NacosProvider01.class, args);
}
@Value("${server.port}")

View File

@ -2,7 +2,7 @@ server:
port: 8762
spring:
application:
name: project-01-provider
name: nacos-01-provider
cloud:
nacos:

View File

@ -13,7 +13,7 @@
<packaging>pom</packaging>
<modules>
<module>project-01</module>
<module>nacos-01</module>
<module>kafka-01</module>
</modules>