A simple Spring Boot web application that displays the current server time and updates automatically every second using JavaScript.
- Real-time digital clock UI
- Responsive layout using CSS and Google Fonts
- Backend API built with Spring Boot
- Java 17+
- Spring Boot
- HTML, CSS, JavaScript (Fetch API)
- Maven
- Linux/Arch Environment
GET /current-time
Returns current local server time in HH:mm:ss format.
-
Clone the Repository
-
Build and Run
- Using Maven:
./mvnw spring-boot:run
- Access the App Open your browser and go to:
src/ └── main/ ├── java/com/example/demo/controller/ClockController.java └── resources/ └── static/index.html