添加Test Provider
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package com.cxyxiaomo.epp;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
// 启动类
|
||||
|
||||
@SpringBootApplication
|
||||
public class TestProvider {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(TestProvider.class, args);
|
||||
}
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
package com.cxyxiaomo.epp.controller;
|
||||
|
||||
// 提供 restful 服务
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class TestController {
|
||||
@GetMapping("/")
|
||||
public String helloWorld() {
|
||||
return "Hello World!";
|
||||
}
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
server:
|
||||
port: 8011
|
||||
|
||||
# Spring 配置
|
||||
spring:
|
||||
application:
|
||||
name: microservice-provider-test
|
@@ -0,0 +1,20 @@
|
||||
package com.cxyxiaomo.epp;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Unit test for simple App.
|
||||
*/
|
||||
public class AppTest
|
||||
{
|
||||
/**
|
||||
* Rigorous Test :-)
|
||||
*/
|
||||
@Test
|
||||
public void shouldAnswerWithTrue()
|
||||
{
|
||||
assertTrue( true );
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user