验证码服务注册到nacos

master
kezhen0805 2 years ago
parent 81b7f6530f
commit 5445c9f346

@ -3,6 +3,8 @@
<component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8">
<file url="file://$PROJECT_DIR$/api-passenger/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/api-passenger/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/service-verificationcode/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/service-verificationcode/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
<file url="PROJECT" charset="UTF-8" />

@ -5,6 +5,7 @@
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
<option value="$PROJECT_DIR$/service-verificationcode/pom.xml" />
</list>
</option>
</component>

@ -16,6 +16,7 @@
<packaging>pom</packaging>
<modules>
<module>api-passenger</module>
<module>service-verificationcode</module>
</modules>
<properties>

@ -0,0 +1,34 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.mashibing</groupId>
<artifactId>taxi2022</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>service-verificationcode</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>
<version>2021.1</version>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

@ -0,0 +1,19 @@
package com.mashibing.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author kezhen
* @date 2023/7/12
* @description
*/
@RestController
public class TestController {
@GetMapping("/test")
public String test(){
return "tingting";
}
}

@ -0,0 +1,18 @@
package com.mashibing;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
/**
* @author kezhen
* @date 2023/7/12
* @description
*/
@SpringBootApplication
@EnableDiscoveryClient
public class serviceVerficationCodeApplication {
public static void main(String[] args) {
SpringApplication.run(serviceVerficationCodeApplication.class);
}
}

@ -0,0 +1,9 @@
server:
port: 8082
spring:
application:
name: service-verificationcode
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8848
Loading…
Cancel
Save