Skip to content

kocherovv/study-project-restapi-servlets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hi, it's a crud api with java Servlets and Hibernate.

I used only standard libraries because the goal was to understand how to work with http requests without frameworks. For Spring, I have a separate project, it is also in my repository.

Folders

controller - it's a folder with my servlets, they are responsible for handling incoming requests.
database - here all classes about db. I used postgresSQL.
domain - My entities. No logic, only static objects
dto - for data trnsport objects
exception - some custom exceptions, i just tried to implement something look like best practice.
mapper - mappers to map entites to dto
model - it's folder for model classes, there is only custom exception's code.
service - all logic should be here, but because it's a simple demonstration app there is only crud operations.
util - it's a folder with configurations and some general classes.

Description

There are only 3 entities: User, File and Event.

Each user can have multiple files. The files are stored in postgreSQL. When interacting with files, Events are created, these events have links to the user who created them and to the file on which the action was performed. Here it would be possible to use audit functions from hibernate and event listeners, but they already exist in other projects and here, after all, the goal was to work with the Jakarta library.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages