第一次提交

master
msb_12211 2 years ago
commit b1aa9d5d7d

@ -0,0 +1,27 @@
<?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>beacon-cloud</artifactId>
<groupId>com.mashibing</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>beacon-api</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
</dependencies>
</project>

@ -0,0 +1,13 @@
package com.mashibing.api;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@SpringBootApplication
@EnableDiscoveryClient
public class ApiStarterApp {
public static void main(String[] args) {
SpringApplication.run(ApiStarterApp.class, args);
}
}

@ -0,0 +1,12 @@
package com.mashibing.api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class TestController {
@RequestMapping("/test")
public String test(){
return "success";
}
}

@ -0,0 +1,19 @@
#服务名称
spring:
application:
name: beacon-api
#多环境
profiles:
active: dev
#nacos注册中心地址
cloud:
nacos:
discovery:
server-addr: 192.168.2.130:8848
#nacos配置中心地址:
config:
server-addr: 192.168.2.130:8848
file-extension: yml
# beacon-api-dev.yml
Loading…
Cancel
Save