This is a simple Spring Boot application that serves as a template for creating web applications. It includes basic configuration and project structure to help you get started quickly.
Before you begin, ensure you have met the following requirements:
- Java Development Kit (JDK) 8 or higher installed (JDK 17 is recommended).
- Apache Maven installed (if you prefer to use Maven for building and managing dependencies).
Follow these steps to get your Spring Boot application up and running:
- Clone this repository to your local machine
- Open it with your favourite IDE
- Edit the
application.properties
(add/update some missing variables)
swp.zoomanagement.gcp.client-id=hello
jwt.secret=world
- Build & Run the application via IDE or manually by Maven
Feel free to customize our Dockerfile
FROM openjdk:17-alpine
WORKDIR /app
COPY ./out/artifacts/ZooManagement_jar .
EXPOSE 8080
CMD ["java", "-jar", "ZooManagement.jar"]
Build Docker container
docker build -t <registry>/<image-name>:<tag> .
Run the container
docker run -dp 8080:8080 <your-image>
com.swp.ZooManagement
- The main package for the Zoo Management applicationapis
- This package contains RESTful API endpoints and controllers for managing the zoo's operations.core
- The core package holds the essential business logic and domain objects of the applicationerrors
- This package is responsible for handling error and custom exceptions. It contains classes for defining and managing application-specific error responses.security
- The security package is used for implementing authentication and authorization mechanisms to secure the application. It includes classes for user authentication, role-based access control, and security configurations.utils
- The utils package contains utility classes and helper methods used throughout the application.ZooManagementApplication.java
- The main class of the application.
- This project includes the following dependencies:
- Spring Boot Data JPA for database access
- Spring Boot Security for authentication and authorization
- Spring Boot Web for building web applications
- Microsoft SQL Server JDBC driver for database connectivity
- Project Lombok for reducing boilerplate code (optional)
- Spring Boot Test for testing the application
- Spring Security Test for security testing (test)
- Jakarta Validation API for validation
- Spring Boot Starter Validation for validation
- Google API Client for working with Google APIs
- Auth0 Java JWT for handling JSON Web Tokens (JWT)