mirror of
https://gitee.com/shikong-sk/springcloud-study
synced 2024-11-09 01:51:19 +08:00
模块调整
This commit is contained in:
parent
5ff94d641e
commit
e81679a233
@ -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>
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
@ -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(){
|
@ -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);
|
||||
}
|
@ -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;
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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}")
|
@ -2,7 +2,7 @@ server:
|
||||
port: 8762
|
||||
spring:
|
||||
application:
|
||||
name: project-01-provider
|
||||
name: nacos-01-provider
|
||||
|
||||
cloud:
|
||||
nacos:
|
Loading…
Reference in New Issue
Block a user