初始化

This commit is contained in:
homemwh
2023-07-05 22:36:12 +08:00
commit ddf5f5466f
5 changed files with 136 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
<?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">
<parent>
<artifactId>yx-test</artifactId>
<groupId>com.yanxiao</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>yx-test-busi</artifactId>
<dependencies>
<dependency>
<groupId>com.yanxiao</groupId>
<artifactId>yx-base-core</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.yanxiao</groupId>
<artifactId>yx-send-message-api</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,18 @@
package com.yanxiao.test;
import com.yanxiao.client.client.SendMessageClient;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
/**
* @author mawuhui
* @since 2023-07-05 22:10
*/
@SpringBootApplication
@EnableFeignClients(clients = SendMessageClient.class)
public class TestBootApplication {
public static void main(String[] args) {
SpringApplication.run(TestBootApplication.class, args);
}
}
@@ -0,0 +1,27 @@
package com.yanxiao.test.web;
import com.yanxiao.client.client.SendMessageClient;
import com.yanxiao.client.model.SendMessageDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @author mawuhui
* @since 2023-07-05 22:11
*/
@Slf4j
@RestController
@RequestMapping("api")
public class TestController {
@Resource
private SendMessageClient sendMessageClient;
@GetMapping("test")
public String test01() {
return sendMessageClient.sendMessage(new SendMessageDTO());
}
}
+10
View File
@@ -0,0 +1,10 @@
server:
port: 8082
spring:
application:
name: yx-test
cloud:
nacos:
server-addr: 110.42.189.169:9016
username: nacos
password: qq755141