Skip to content

Someshbose/FileUploader

Repository files navigation

SpringApp -FileUploader

Build Status License: MIT

A Microservice to upload file.

To build the project in local

mvn clean package

To create a docker image of the app

mvn package dockerfile:build

To run the app in local

  • Run kafka in local(optional) localhost:9092 - default kafka

For additional kafka command details click here

  • start the application
  • through dockerImage itself.
  • importing the project and running through ide.
  • For Maven profile(pom.xml) change the DEVELOPMENT as active instead of TEST profile.
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
  • For more information related to application.
http://localhost:8080/app/service/actuator
  • h2 db embedded console can be found on below url.
http://localhost:8080/app/service/h2-console
  • File Uploader post upload url.
http://localhost:8080/app/service/filestore

body:
{
    "charSet":"UTF-8",
    "correlationId":"123",
    "fileContent":"odia",
    "fileName":"somesh.txt",
    "fileTypeCode":"ABC",
    "submitterEmail":"[email protected]",
    "fieldSeparator":","
}
  • File Uploader get url.
localhost:8080/app/service/findbyId/<ref-id>
  • After file successfully Uploaded we will see a Message on kafka topic fileUploaded-notify

  • File Status Consumer Message template on topic filestatus

{
   "eventName":null,
   "eventDate":"2020-11-13T07:32:46.869779Z",
   "fileLocation":"88e437117577455a9d90049cab1d69a7",
   "fileName":"somesh.txt",
   "fileTypeCode":"ResultType",
   "status":"PROCESSED",
   "serviceName":"FileUploaderConsumer"
}

About

File Uploader Microservice Implementation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published