Feature/bael 5756 choose api (#13227)
* BAEL-5756: Rest controller * BAEL-5756: GraphQL controller (without tests) * BAEL-5756: Fix GraphQL test * BAEL-5756: Fix GraphQL test 2 * BAEL-5756: GRPC working * BAEL-5756: GRPC with Spring Boot * BAEL-5756: Books proto service * BAEL-5756: Fix grpc integration test * BAEL-5756: Refactor * BAEL-5756: Revert some changes * BAEL-5756: Fix integration tests port issue between gRPC and GraphQL * BAEL-5756: Fix pom merge issue * BAEL-5756: Fix typo
This commit is contained in:
parent
ca9fecfaae
commit
84a93ffbd4
|
@ -13,6 +13,47 @@
|
|||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>kr.motd.maven</groupId>
|
||||
<artifactId>os-maven-plugin</artifactId>
|
||||
<version>1.7.0</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.xolstice.maven.plugins</groupId>
|
||||
<artifactId>protobuf-maven-plugin</artifactId>
|
||||
<version>${protobuf-plugin.version}</version>
|
||||
<configuration>
|
||||
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
|
||||
<pluginId>grpc-java</pluginId>
|
||||
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
<goal>compile-custom</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<protobuf.version>3.19.2</protobuf.version>
|
||||
<protobuf-plugin.version>0.6.1</protobuf-plugin.version>
|
||||
<grpc.version>1.43.2</grpc.version>
|
||||
<grpc.spring.version>2.13.1.RELEASE</grpc.spring.version>
|
||||
<jsonassert.version>1.5.1</jsonassert.version>
|
||||
<jakarta.annotation.version>1.3.5</jakarta.annotation.version>
|
||||
<os-maven-plugin.version>1.6.2</os-maven-plugin.version>
|
||||
<maven-war-plugin.version>3.3.2</maven-war-plugin.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
@ -78,45 +119,4 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>kr.motd.maven</groupId>
|
||||
<artifactId>os-maven-plugin</artifactId>
|
||||
<version>1.7.0</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.xolstice.maven.plugins</groupId>
|
||||
<artifactId>protobuf-maven-plugin</artifactId>
|
||||
<version>${protobuf-plugin.version}</version>
|
||||
<configuration>
|
||||
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
|
||||
<pluginId>grpc-java</pluginId>
|
||||
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
<goal>compile-custom</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<protobuf.version>3.19.2</protobuf.version>
|
||||
<protobuf-plugin.version>0.6.1</protobuf-plugin.version>
|
||||
<grpc.version>1.43.2</grpc.version>
|
||||
<grpc.spring.version>2.13.1.RELEASE</grpc.spring.version>
|
||||
<jsonassert.version>1.5.1</jsonassert.version>
|
||||
<jakarta.annotation.version>1.3.5</jakarta.annotation.version>
|
||||
<os-maven-plugin.version>1.6.2</os-maven-plugin.version>
|
||||
<maven-war-plugin.version>3.3.2</maven-war-plugin.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -2,6 +2,8 @@ server:
|
|||
port: 8082
|
||||
|
||||
spring:
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
graphql:
|
||||
graphiql:
|
||||
enabled: true
|
||||
|
|
|
@ -11,7 +11,9 @@ import java.nio.file.Files;
|
|||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = ChooseApiApp.class)
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
|
||||
properties = { "grpc.server.port=-1" }, // Disable gRPC external server
|
||||
classes = ChooseApiApp.class)
|
||||
@ActiveProfiles("chooseapi")
|
||||
class BooksControllerGraphQLIntegrationTest {
|
||||
|
||||
|
|
|
@ -9,13 +9,15 @@ import org.junit.jupiter.api.Test;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
import org.springframework.test.web.servlet.MockMvc;
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
@SpringBootTest
|
||||
@SpringBootTest(properties = { "grpc.server.port=-1" }) // Disable gRPC external server
|
||||
@ActiveProfiles("chooseapi")
|
||||
@AutoConfigureMockMvc
|
||||
class BooksControllerRestIntegrationTest {
|
||||
|
||||
|
|
Loading…
Reference in New Issue