DOCKER / NOTES</>↗Docker04 Jul 2026
Containerizing and Deploying a Java Application with Docker A typical Java Docker workflow is: Build the Java application Package it as a JAR Create a Docker image Run the container locally Push the image to a registry Deploy it to a server or cloud platform 1. Build Your Java Application If your project uses Maven, […]
BASIC / NOTES</>↗Basic04 Jul 2026
Understanding Java’s Evolution from Java 8 to Java 25 A good way to understand Java’s evolution from Java 8 to Java 25 is to view it in phases: Java 8 established modern Java’s functional-programming foundation. Java 9–11 reshaped the platform and release model. Java 12–17 modernized the language with records, pattern matching, text blocks, and […]
SPRING / NOTES</>↗Spring04 Jul 2026
Typical Spring Layer Organization A clean Spring application usually separates code into controller, service, repository, and model/entity layers. com.example.app ├── AppApplication.java ├── controller │ └── UserController.java ├── service │ └── UserService.java ├── repository │ └── UserRepository.java ├── entity │ └── User.java └── dto ├── CreateUserRequest.java └── UserResponse.java The usual request flow is: HTTP Request ↓ […]
SPRING / NOTES</>↗Spring04 Jul 2026
In Spring, transactions are usually managed with the @Transactional annotation. A transaction makes sure that a group of database operations is either: all succeed, or all fail and roll back This is important when one business operation changes multiple records or tables. 1. Enable Transaction Management If you are using Spring Boot with Spring Data […]
SPRING JDBC / NOTES</>↗Spring JDBC03 Jul 2026
You can use JDBC with Spring through Spring’s JDBC support, especially JdbcTemplate. It removes much of the repetitive JDBC boilerplate such as opening connections, closing resources, handling PreparedStatement, iterating ResultSet, and translating SQLException into Spring’s DataAccessException hierarchy. The typical setup is: Configure a DataSource Create a JdbcTemplate Inject it into a repository/DAO class Use it […]
SPRING DATA JPA / NOTES</>↗Spring Data JPA03 Jul 2026
To connect Spring to a database, the usual modern approach is: Add database-related dependencies. Configure the database connection properties. Create an entity. Create a repository. Use the repository from a service or controller. The simplest way is with Spring Boot + Spring Data JPA. 1. Add Maven Dependencies For a Spring Boot application using JPA, […]