Commit f82847e6 authored by mohammad.salama's avatar mohammad.salama

Running But DNS Problem

parent 85ec99e7
......@@ -72,11 +72,7 @@
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>FileUploadUsingGRPCAndSBoot</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>net.devh</groupId>
<artifactId>grpc-client-spring-boot-autoconfigure</artifactId>
......
grpc.client.file-upload.address= //127.0.0.1:8081
grpc.client.file-upload.negotiationType= plaintext
......@@ -10,7 +10,7 @@
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.shared</groupId>
<groupId>com.shared.proto</groupId>
<artifactId>proto</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>proto</name>
......@@ -93,6 +93,11 @@
<artifactId>spring-db-fileservice</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>com.shared</groupId>
<artifactId>proto</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
......
package com.shared.proto;
import MyFileUploadService.FileMetadata;
//import MyFileUploadService.FileMetadata;
import MyFileUploadService.*;
import io.grpc.Context;
import io.grpc.Metadata;
......
......@@ -2,11 +2,18 @@
<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>
<!-- <parent>
<artifactId>FileUploadUsingGRPCAndSBoot</artifactId>
<groupId>com.example</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
-->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.17</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>Server</artifactId>
......
package com.grpc.server.fileupload.server;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class ServerApplication {
public static void main(String[] args) {
SpringApplication.run(ServerApplication.class, args);
}
}
......@@ -5,8 +5,9 @@ import MyFileUploadService.*;
import com.google.protobuf.InvalidProtocolBufferException;
import com.shared.proto.Constants;
import io.grpc.*;
import net.devh.boot.grpc.server.interceptor.GrpcGlobalServerInterceptor;
//@GrpcGlobalServerInterceptor
@GrpcGlobalServerInterceptor
public class FileUploadInterceptor implements ServerInterceptor {
@Override
public <ReqT, RespT> ServerCall.Listener<ReqT> interceptCall(ServerCall<ReqT, RespT> serverCall, Metadata metadata, ServerCallHandler<ReqT, RespT> serverCallHandler) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment