添加Test Provider
This commit is contained in:
parent
bbcccb81ca
commit
530d32f2af
2
backend/.idea/encodings.xml
generated
2
backend/.idea/encodings.xml
generated
@ -7,6 +7,8 @@
|
|||||||
<file url="file://$PROJECT_DIR$/microservice-pojo/src/main/resources" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/microservice-pojo/src/main/resources" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/microservice-provider-miniprogram-8080/src/main/java" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/microservice-provider-miniprogram-8080/src/main/java" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/microservice-provider-miniprogram-8080/src/main/resources" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/microservice-provider-miniprogram-8080/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/microservice-provider-test-8011/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/microservice-provider-test-8011/src/main/resources" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/microservice-provider-user-8001/src/main/java" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/microservice-provider-user-8001/src/main/java" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/microservice-provider-user-8001/src/main/resources" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/microservice-provider-user-8001/src/main/resources" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||||
|
16
backend/.idea/runConfigurations/TestProvider.xml
generated
Normal file
16
backend/.idea/runConfigurations/TestProvider.xml
generated
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="TestProvider" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
|
||||||
|
<option name="ACTIVE_PROFILES" />
|
||||||
|
<module name="microservice-provider-test-8011" />
|
||||||
|
<option name="SPRING_BOOT_MAIN_CLASS" value="com.cxyxiaomo.epp.TestProvider" />
|
||||||
|
<extension name="coverage">
|
||||||
|
<pattern>
|
||||||
|
<option name="PATTERN" value="com.cxyxiaomo.epp.*" />
|
||||||
|
<option name="ENABLED" value="true" />
|
||||||
|
</pattern>
|
||||||
|
</extension>
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
@ -21,7 +21,6 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<version>4.11</version>
|
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -3,6 +3,8 @@ server:
|
|||||||
max-http-header-size: 102400
|
max-http-header-size: 102400
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
|
application:
|
||||||
|
name: microservice-provider-miniprogram
|
||||||
datasource:
|
datasource:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://127.0.0.1:3306/epp?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&serverTimezone=UTC
|
url: jdbc:mysql://127.0.0.1:3306/epp?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&serverTimezone=UTC
|
||||||
|
31
backend/microservice-provider-test-8011/pom.xml
Normal file
31
backend/microservice-provider-test-8011/pom.xml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?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>epp</artifactId>
|
||||||
|
<groupId>com.cxyxiaomo</groupId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>microservice-provider-test</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<maven.compiler.source>11</maven.compiler.source>
|
||||||
|
<maven.compiler.target>11</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!-- Spring Boot -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-test</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
@ -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 );
|
||||||
|
}
|
||||||
|
}
|
@ -17,6 +17,7 @@
|
|||||||
<module>microservice-pojo</module>
|
<module>microservice-pojo</module>
|
||||||
<module>microservice-provider-user-8001</module>
|
<module>microservice-provider-user-8001</module>
|
||||||
<module>microservice-provider-miniprogram-8080</module>
|
<module>microservice-provider-miniprogram-8080</module>
|
||||||
|
<module>microservice-provider-test-8011</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<!-- 统一管理jar包版本 -->
|
<!-- 统一管理jar包版本 -->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user