14- Packaging Structure for second project
Spring Starter Project in STS
Name- springboot-backendd
Type- Maven
Packaging- Jar
Artifact Id- springboot-backendd
Description - Spring Boot RESTful Web Services
Dependencies- Spring Web , Spring Data JPA , MySQL Driver
Image 1- Packaging Structure of App in this Image
_______________________________________________________
YELLOW IS for Java Project
BLUE IS for Folder
GREEN IS for Package
RED IS for Class
Pink is for pom.xml
_________________________________________
springboot-backendd
--> src/main/java
net.javaguides.springboot
SpringBootBackenddApplication.java
net.javaguides.springboot.controller
EmployeeController.java
net.javaguides.springboot.exception
ResourceNotFoundException.java
net.javaguides.springboot.model
Employee.java
net.javaguides.springboot.repository
EmployeeRepository.java
net.javaguides.springboot.service
EmployeeService.java
net.javaguides.springboot.service.impl
EmployeeServiceImpl.java
--> src/main/resources
static
templates
application.properties
--> src/test/java
--> JRE System Library
--> MavenDependencies
--> src
--> target
--> mvnw
--> mvnw.cmd
--> pom.xml
------------------------------
springboot-backendd --> pom.xml
-----------------------------------------------------------
Explaining Each component of project structure
src/main/java
This is the main method to launch project...
Java source code for the artifact.
The main folder contains your application code and resources.
src/main/resources
Resources used in the project.
Static resources like css,js,images inside static folder
jsp or html files under templates folder
Configuring all application level configuration in application.properties
pom.xml
It is an XML file that contains information about the project and configuration details used by Maven to build the project.
-------------------------------------------------
JRE System Library
Basically the library of project(managed by IDE)
src/test/java
The test folder contains test code and resources.
Places your test use case code, like junit test.
These codes would be executed when doing maven package things. These codes won't be packaged to your war or jar file.
src
The src directory contains all of the source material for building the project, its site and so on.
It contains a subdirectory for each type: main for the main build artifact, test for the unit test code and resources, site and so on.
target
The target directory is used to house all output of the build.
mvnw
The mvnw file is for Linux (bash) environment
mvnw.cmd
The mvnw.cmd is for the Windows environment.
Comments
Post a Comment