CMS based on Spring Boot.
The aim is to create a lightweight, flexible, and extensible content management system built purely on Spring Boot and an SQL database.
This project follows a classic MVC architecture — simple, intuitive, and easy to understand for most developers.
It uses the powerful Spring Data JPA for data persistence and entity management.
Prerequisites: Java 24 We recommend to use SDKMAN to manage multiple Java versions.
- Clone repository
- Go to project folder
cd cms-boot - Run the application
./gradlew bootRun
The application is running on http://localhost:8080
Note: The default database is H2 (in-memory). Access the H2 console at http://localhost:8080/h2-console (Credentials_ sa / test). This setup is suitable for development and testing purposes only.
You can log in at /login using these default credentials:
| Role | Password | |
|---|---|---|
| Admin | [email protected] | admin |
| Developer | [email protected] | admin |
As a developer, you can manage page texts and page images via the admin interface.
As an administrator, you can edit these texts and images.
Use the addPageData(model, page) method to inject dynamic content into your views.
Example from HomepageController.java:
@RequestMapping("/")
public String index(Model model) {
addPageData(model, "homepage");
return "front/index";
}In your templates (e.g., about.html), you can access these dynamic variables:
<div class="row">
<div class="col-lg-12 text-center">
<h1 class="mt-5">About us</h1>
<p th:utext="${pageTexts.get('about-text')}"></p>
<image th:src="@{/file/} + ${pageImages.get('about-image')}"></image>
</div>
</div>We recommend you to use IntelliJ IDEA.
- Install the Lombok Plugin via Settings → Plugins.
- Enable annotation processing in Settings → Build, Execution, Deployment → Compiler → Annotation Processors.
