Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
FileUploadingService
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mohammad.salama
FileUploadingService
Commits
f82847e6
Commit
f82847e6
authored
Nov 22, 2023
by
mohammad.salama
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Running But DNS Problem
parent
85ec99e7
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
37 additions
and
9 deletions
+37
-9
pom.xml
Client/pom.xml
+1
-5
application.properties
Client/src/main/resources/application.properties
+2
-0
pom.xml
Proto/pom.xml
+6
-1
Constants.java
Proto/src/main/java/com/shared/proto/Constants.java
+3
-1
pom.xml
Server/pom.xml
+8
-1
ServerApplication.java
.../com/grpc/server/fileupload/server/ServerApplication.java
+14
-0
FileUploadInterceptor.java
.../fileupload/server/interceptor/FileUploadInterceptor.java
+2
-1
application.properties
Server/src/main/resources/application.properties
+1
-0
No files found.
Client/pom.xml
View file @
f82847e6
...
...
@@ -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>
...
...
Client/src/main/resources/application.properties
0 → 100644
View file @
f82847e6
grpc.client.file-upload.address
=
//127.0.0.1:8081
grpc.client.file-upload.negotiationType
=
plaintext
Proto/pom.xml
View file @
f82847e6
...
...
@@ -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>
...
...
Proto/src/main/java/com/shared/proto/Constants.java
View file @
f82847e6
package
com
.
shared
.
proto
;
import
MyFileUploadService.FileMetadata
;
//import MyFileUploadService.FileMetadata;
import
MyFileUploadService.*
;
import
io.grpc.Context
;
import
io.grpc.Metadata
;
...
...
Server/pom.xml
View file @
f82847e6
...
...
@@ -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>
...
...
Server/src/main/java/com/grpc/server/fileupload/server/ServerApplication.java
0 → 100644
View file @
f82847e6
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
);
}
}
Server/src/main/java/com/grpc/server/fileupload/server/interceptor/FileUploadInterceptor.java
View file @
f82847e6
...
...
@@ -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
)
{
...
...
Server/src/main/resources/application.properties
0 → 100644
View file @
f82847e6
server.port
=
8081
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment