ReviewIn the previous section, we have laid down the functional specs of the application. In this section, we will start writing the Java classes and discuss the project's structure.
Table of ContentsPart 1: Introduction and Functional Specs
Part 2: Java classes
Part 3: XML configuration
Part 4: HTML form
Part 5: Running the Application
Project StructureOur application is a Maven project which means our project follows the Maven structure.
Here's a preview of our project's structure:
Domain LayerThe domain layer contains a Message class that is used as a container to hold file details.
The domain layer also contains an UploadedFile class which is used for sending file information after it has been processed by the controller.
Controller LayerThe controller layer contains a simple controller that serves a form for uploading files. There are two important endpoints here:
- /message - processes the file descriptions
- /file - receives the files themselves
To simplify this tutorial, we're not persisting the messages and files in a database or to the disk.
OthersStatusResponse is used to determine the status of a request, and includes an error message if any.
NextWe've completed writing our Java classes. In the next section, we will start writing the configuration files. Click here to proceed.
Share the joy:
Subscribe by reader Subscribe by email Share