Giter VIP home page Giter VIP logo

artifact-upload-demo's Introduction

Artifact Upload Demo

This is a simple Spring Boot client-server application for PoC/demo upload of the files from client to server.

Features

  • Run a Java/Spring Boot/Tomcat server to accepts the incoming connections.
  • Run a command-line client that uploads the specified file and exits.

Quick Start

Start The Server

  1. Edit src/main/resources/application.properties to configure artifact folder (file.upload-dir) and port (server.port, optional).
  2. Start the server:
mvn spring-boot:run

Run The Client

On Linux

  1. Download and install dependencies:
mvn clean install
  1. Run the client (upload a file):
SERVER_URL="http://localhost:8080" # Change if needed
CLASS_PATH="target/classes;target/dependency/httpclient-4.5.13.jar;target/dependency/httpcore-4.4.16.jar;target/dependency/httpmime-4.5.13.jar;target/dependency/commons-logging-1.2.jar"
CLIENT_CLASS="com.example.artifactuploaddemo.client.ArtifactUploadClient"
java -cp $CLASS_PATH $CLIENT_CLASS $SERVER_URL <filename_to_upload>

On Windows

  1. Download and install dependencies:
mvn clean install
  1. Run the client (upload a file):
$serverUrl = "http://localhost:8080" # Change if needed
$classPath = "target/classes;target/dependency/httpclient-4.5.13.jar;target/dependency/httpcore-4.4.16.jar;target/dependency/httpmime-4.5.13.jar;target/dependency/commons-logging-1.2.jar"
$clientClass = "com.example.artifactuploaddemo.client.ArtifactUploadClient"
java.exe -cp $classPath $clientClass $serverUrl <filename_to_upload>

Development

This section is generated automatically by Spring Initializr.

Reference Documentation

For further reference, please consider the following sections:

Guides

The following guides illustrate how to use some features concretely:

Maven Parent overrides

Due to Maven's design, elements are inherited from the parent POM to the project POM. While most of the inheritance is fine, it also inherits unwanted elements like <license> and <developers> from the parent. To prevent this, the project POM contains empty overrides for these elements. If you manually switch to a different parent and actually want the inheritance, you need to remove those overrides.

artifact-upload-demo's People

Contributors

tolache avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.