File Management System is a hybrid file storing system. The file information is saved into database. The file content is located into logical disk. The system is exposed via API.
- Functionalities
- 1.1 File Upload
- 1.2 File Download
- 1.3 Storage mode
- Getting Started (Prerequisites, Installing)
- 2.1 Prerequisites
- 2.2 Database installation
- 2.2.1 H2
- 2.2.2 MySQL
- 2.2.3 PostgreSQL
- Running the tests
- Deployment 4.1 Deployment & run on LINUX environment 4.2 Deployment & run on WINDOWS environment
- Swagger usage
- Built With
- Contributing
- Versioning
- Authors
- License
- Donation
Clone or download a copy of this project.
This project requires Java 1.8, Maven and at least one database (PostgreS, H2, MySql).
No installation is required.
The spring.datasource.url
is the one required property which should be set. By default, the
username is sa
with empty password. Two modes: in memory and file storage. See the application.properties
file for more details related configuration.
To access default H2 Console use this link: http://localhost:8081/h2-console/ , where 8081 is the server port.
CREATE DATABSE fms;
Note: in case that you run the application starting with MySQL 8.0.4, please execute the following query:
ALTER USER '${USER}'@'localhost' IDENTIFIED WITH mysql_native_password BY '${PASSWORD}';
-- where ${USER} and ${PASSWORD} should be provided.
Install PostgreSQL. It is required to create a database:
Please, run the following commands if it is the case:
createuser -U postgres -s Progress
Please, run the following command to import a database (if it is the case):
pg_restore -d DATABASE_NAME < PATH/BACKUP_FILE_NAME.sql
To create the JAR file please use the following command:
mvn clean package
All available unit / integration tests are in package: src/test/java
.
The main rule is: one unit test class for each java class.
If the build (the jar file) is ready then the application can be run. Please, use the following command to run the application:
XXX:file-management-system xxx java -jar target/file-management-system-X.Y.Z-SNAPSHOT.jar
In case if application is run in a linux based instance, please create the following folders:
- /app - folder where the JAR is located;
- /app/log - folder which will contains the logs;
- /app/config - folder which will contains the application configuration files;
- /app/file-db - production or working folder where service will save physically the content;
- /app/test-db - test folder where service will save physically the content;
To run the application we have the following options:
nohub java -jar file-management-system-1.0.7.jar --spring.config.location=/app/config/application.properties &
To show last NUM_OF_RECORDS from a FILE_NAME linux command:
tail -n NUM_OF_RECORDS FILE_NAME
The application was developed on Windows environment. We did not test how the application works on PRODUCTION on WINDOWS environment.
To run application, please run this command:
java -jar /projects/app/file-management-system-1.0.7.jar --spring.config.location=/projects/app/config/application.properties
You can use swagger for testing proposes:
URL: APP_HOST/swagger-ui.html . For example: http://localhost:8081/swagger-ui.html
- Java - Java technology allows you to work and play in a secure computing environment. Java allows you to play online games, chat with people around the world, calculate your mortgage interest, and view images in 3D, just to name a few.
- Spring Security - Spring Security is a powerful and highly customizable authentication and access-control framework. It is the de-facto standard for securing Spring-based applications.
- Spring Boot - Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run".
- Spring Data - Spring Data’s mission is to provide a familiar and consistent, Spring-based programming model for data access while still retaining the special traits of the underlying data store.
- Spring Data JPA - Spring Data JPA, part of the larger Spring Data family, makes it easy to easily implement JPA based repositories. This module deals with enhanced support for JPA based data access layers. It makes it easier to build Spring-powered applications that use data access technologies.
- Spring Doc - Java library helps to automate the generation of API documentation using spring boot projects..
- H2 - H2 is a relational database management system written in Java. It can be embedded in Java applications or run in client-server mode.
- PostgreSQL - PostgreSQL, also known as Postgres, is a free and open-source relational database management system (RDBMS) emphasizing extensibility and technical standards compliance. It is designed to handle a range of workloads, from single machines to data warehouses or Web services with many concurrent users. It is the default database for macOS Server, and is also available for Linux, FreeBSD, OpenBSD, and Windows.
- Maven - Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning.
Sergiu Drahnea is the author and the person who developed the system. If you wish to contact then please drop a message to my LinkedIn account: https://www.linkedin.com/in/sergiu-drahnea/
MIT License
in general.
If you want to run the system in production and have questions or need advices then please drop a message.
- PayPal - any donation is welcomed in case that you was pleased with this work :p
- EGLD - Address:
erd1t3t5m8v7862asdh48nq820shsmlmuw9jpm87qw25cvch7djpkapskgq4es
- TROY - Address:
bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23
and Memo:100079140
- PHB - Address:
bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23
and Memo:100079140
- HOT - Address:
0x1ebfc62e2510f0a0558568223d1d101d0cf074b2
- VET - Address:
0x1ebfc62e2510f0a0558568223d1d101d0cf074b2
- TRX - Address:
TRe8xSkGqpS73Nhk6bnvW34aiJoRTmZs8N
- BTT - Address:
TRe8xSkGqpS73Nhk6bnvW34aiJoRTmZs8N