Skip to content

Commit

Permalink
use ipman-config-client 0.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ipipman committed May 12, 2024
1 parent 6eaf86c commit b37b7d7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 29 deletions.
2 changes: 1 addition & 1 deletion demo.http
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ GET http://localhost:8088/api/?id=101
GET http://localhost:8081/ports?ports=8082

### 用于测试Apollo配置中心的更新
GET http://localhost:8081/metas
GET http://localhost:8082/metas

### 测试config-man配置中心, 作者:ipman
GET http://localhost:8081/demo-config
Expand Down
6 changes: 6 additions & 0 deletions rpcman-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@
<version>${apollo.version}</version>
</dependency>

<dependency>
<groupId>io.github.ipipman</groupId>
<artifactId>config-client</artifactId>
<version>0.0.4</version>
</dependency>

</dependencies>

</project>
6 changes: 0 additions & 6 deletions rpcman-demo-provider/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.github.ipipman</groupId>
<artifactId>config-client</artifactId>
<version>0.0.1</version>
</dependency>

</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package cn.ipman.rpc.demo.provider;

import cn.ipman.config.client.annotation.EnableIpManConfig;
import cn.ipman.rpc.core.api.RpcRequest;
import cn.ipman.rpc.core.api.RpcResponse;
import cn.ipman.rpc.core.config.ProviderConfig;
Expand Down Expand Up @@ -28,38 +29,18 @@
@SpringBootApplication
@RestController
@Import({ProviderConfig.class, RegistryCenterConfig.class})
@EnableApolloConfig
@Slf4j
//@EnableIpManConfig
@EnableApolloConfig
//@EnableIpManConfig // 参考: https://github.com/ipipman/config-man
public class RpcmanDemoProviderApplication {

// @Bean
// ApolloChangedListener apolloChangedListener() {
// return new ApolloChangedListener();
// }


public static void main(String[] args) {
SpringApplication.run(RpcmanDemoProviderApplication.class, args);
}

@Autowired
private UserService userService;


// ---------- 测试config-man配置中心, 作者:ipman ---------
// @Autowired
// private DemoConfig demoConfig;
//
// @GetMapping("/demo-config")
// public String demo() {
// return "ipman.demo.a = " + demoConfig.getA() + ", \n" +
// "ipman.demo.b = " + demoConfig.getB() + ", \n" +
// "ipman.demo.c = " + demoConfig.getC() + ", \n";
// }
//
// ---------- 测试config-man配置中心, 作者:ipman ---------

@RequestMapping("/ports")
public RpcResponse<String> ports(@RequestParam("ports") String ports) {
userService.setTimeoutPorts(ports);
Expand Down

0 comments on commit b37b7d7

Please sign in to comment.