Notes accumulated while learning Java and the Spring ecosystem across several books, courses, and side projects. Grouped by topic/source below.
- 01/71
Code Structure
What goes in a source file, a class, and a method in Java, and the anatomy of the main method.
- 02/71
Codecademy: Spring Beans & the IoC Container
What a Spring bean is, how @Component and @Autowired replace manual `new`-based instantiation, and how @SpringBootApplication bundles @Configuration/@ComponentScan/@EnableAutoConfiguration.
- 03/71
Persistence: ORM, JPA & Hibernate
What ORM and JPA actually are, how Hibernate implements the spec, and two ways to connect to a database — persistence.xml and the programmatic PersistenceUnitInfo approach.
- 04/71
Reactive: Spring WebFlux Intro
What Spring WebFlux is, the reactive drivers it supports, and its two programming models.
- 05/71
Set
Key properties of Java's Set interface — uniqueness, ordering guarantees per implementation, and the core Set interface methods.
- 06/71
Spring Academy: Implementing REST
Building out a full REST controller (GET by id, GET all with pagination/sorting, POST, PUT, DELETE) against a CrudRepository, following Spring Academy's Cash Card project.
- 07/71
Spring Fundamentals: Wiring & Dependency Injection
Bootstrapping an application context from a config class, and disambiguating between multiple beans of the same type with @Qualifier.
- 08/71
Spring Security: CORS
Resolving CORS with @CrossOrigin on a controller, versus a proper CorsConfigurationSource inside the security filter chain.
- 09/71
Spring Start Here: Keywords
Core Spring vocabulary — service, repository, proxy, servlet container, view, controller, bean, and @Component.
- 10/71
Testing: Repository Layer
Testing Spring Data repositories with @DataJpaTest, the given/when/then (BDD) test structure, and using @BeforeEach to avoid repeating setup.
- 11/71
Threads: An Introduction
Safety, liveness, and performance hazards of concurrent Java code, race conditions, and fixing them with synchronization and atomic variables — notes from Java Concurrency in Practice.
- 12/71
Codecademy: REST Controller Annotations
Spring's core REST annotations — @RestController, @RequestMapping, the HTTP-method mappings, @RequestParam, @PathVariable, and @ResponseStatus — worked through two example controllers.
- 13/71
HashSet
Creating, adding to, iterating over, and removing from a HashSet, plus its key properties (unordered, unique, non-synchronized).
- 14/71
Persistence: The Context
How Hibernate's persistence context mirrors entities to database rows, and what find/persist/merge/remove/refresh/detach actually do to it.
- 15/71
Reactive: The Need for WebFlux
Why thread-per-request blocking I/O doesn't scale, how WebFlux uses non-blocking threads instead, and a Flux-returning streaming controller example.
- 16/71
Spring Academy: Spring Security Fundamentals
Authentication vs authorization, how Spring Security's default filter works, in-memory and JDBC-backed authentication, and role-based authorization with SecurityFilterChain.
- 17/71
Spring Fundamentals: Bean Scopes
Singleton vs prototype vs request-scoped beans, why injecting a request-scoped bean into a singleton fails at startup, and how ScopedProxyMode fixes it.
- 18/71
Spring Security: Architecture
The core pieces of Spring Security's authentication flow — AuthenticationManager, AuthenticationProvider, UserDetailsService, and how they fit together with OncePerRequestFilter.
- 19/71
Spring Start Here: Implementing a Web App with Spring MVC
Wiring up a @Controller with @RequestMapping, serving Thymeleaf templates, and the four ways to get data from an HTTP request — parameters, headers, path variables, and the body.
- 20/71
Testing: Service Layer
Mocking a repository dependency with Mockito's @Mock and @InjectMocks to unit test a service in isolation.
- 21/71
Variables
Declaring and defining variables in Java, variable scope, static "global" variables, and default values.
- 22/71
Data Types
Java's primitive and reference data types, and implicit vs explicit type conversion.
- 23/71
Map
Key properties of Java's Map interface, a HashMap walkthrough, and five different ways to loop through a HashMap.
- 24/71
Persistence: Working with the Context
Hibernate properties (show_sql, hbm2ddl.auto), why find() sometimes skips a query entirely, find() vs getReference(), and how refresh() undoes context changes.
- 25/71
Reactive: WebClient
Why WebClient replaces the blocking RestTemplate for inter-service calls, and a basic reactive HTTP request example.
- 26/71
Spring Academy: JWT Sign-in & Sign-up
A full JWT authentication implementation — the User/Role/Token entities, SecurityFilterChain, JwtFilter, JwtService, and a registration endpoint with email verification.
- 27/71
Spring Fundamentals: Transactions
Wiring up @Transactional with JdbcTemplate, why rollback only applies to runtime exceptions by default, and using noRollbackFor to override that.
- 28/71
Spring Start Here: The Spring MVC Flow
The five-step request lifecycle in Spring MVC, from dispatcher servlet to rendered response.
- 29/71
Spring: Unit Testing Services with Mockito
Why testing a service means mocking its repository dependency, using @MockBean in a Spring context and plain Mockito with @ExtendWith(MockitoExtension.class).
- 30/71
Testing: Controller Layer
Testing Spring MVC controllers with @WebMvcTest and MockMvc, mocking the service layer, and asserting JSON responses with Hamcrest and JsonPath.
- 31/71
Operators
Arithmetic, relational, logical, and ternary operators in Java.
- 32/71
Persistence: Primary Keys
Writing a custom IdentifierGenerator, and defining composite primary keys with @IdClass or an @Embeddable id.
- 33/71
Queue
FIFO behavior, insertion/removal methods, and a LinkedList-backed walkthrough of Java's Queue interface.
- 34/71
Spring Security: JWT (Bezkoder-style)
A full username/password + JWT auth implementation — User/Role models, SecurityConfig, UserDetailsImpl, AuthTokenFilter, JwtUtils, AuthEntryPointJwt, and the signup/signin controller.
- 35/71
Spring Start Here: Bean Scopes
Singleton and prototype bean scopes, the web-specific request/session/application scopes, and a login-flow example that uses all three.
- 36/71
Testing: Integration Tests
Full-context integration testing with @SpringBootTest, the WebEnvironment options, and using Testcontainers (plus the Singleton Containers pattern) to avoid depending on a pre-installed database.
- 37/71
Persistence: One-to-One Relationships
Modeling a JPA @OneToOne relationship unidirectionally and bidirectionally, plus cascade and fetch type.
- 38/71
Spring Security: OAuth2 Authorization Server
The main components of a Spring Authorization Server, an in-memory implementation, the authorization code grant flow, and swapping in-memory user/client management for a database.
- 39/71
Spring Start Here: Common Annotations
What @Component, @Service, @Repository, @Controller, @ResponseBody, and @RestController each actually mean.
- 40/71
Strings
Declaring strings, format specifiers, length/case/comparison methods, and replacing or searching substrings.
- 41/71
Persistence: One-to-Many Relationships
The three ways to model a JPA one-to-many relationship — unidirectional from either side, and bidirectional — plus how ownership determines the foreign key.
- 42/71
Spring Security: JWT from Scratch
Building JWT authentication manually with jjwt — SecurityConfigurer, MyUserDetailsService, JwtUtil, the login controller, and a JwtRequestFilter.
- 43/71
User Input
Reading user input from the console with Scanner, and using printf to format output inline.
- 44/71
Conditional Statements
If/else ladders and switch-case statements in Java.
- 45/71
Persistence: Many-to-Many Relationships
Modeling a JPA many-to-many relationship through a join table, with @JoinTable and mappedBy.
- 46/71
Spring Security: Setup Checklist
A quick checklist for wiring up Spring Security in a new project — dependencies, UserDetails, the user data service, security configuration, and authorization rules.
- 47/71
Arrays
Declaring, printing, and using array methods (sort, search, fill, copy, compare) in Java.
- 48/71
Loops
For, while, do-while, and for-each loops in Java, including looping over arrays.
- 49/71
ArrayLists
Using ArrayList as a resizable alternative to arrays, common methods, and looping with forEach.
- 50/71
HashMaps
Key-value pairs in Java with HashMap — put, get, remove, and iterating with forEach.
- 51/71
Object-Oriented Programming
A worked walkthrough of OOP in Java — classes, constructors, getters, abstraction, inheritance, and encapsulation, built up through a book-borrowing example.
- 52/71
The Math Class
Rounding, ceiling/floor, min/max, and generating random numbers with java.lang.Math.
- 53/71
Formatting Numbers
Formatting numbers as currency and percentages with java.text.NumberFormat.
- 54/71
Interfaces
What an interface is and why it decouples code, plus the rules around interface methods, multiple implementation, and default methods.
- 55/71
Exception Handling
Checked vs unchecked exceptions, try/catch/finally, try-with-resources, the exception hierarchy, throwing exceptions, and custom exceptions.
- 56/71
Abstract Classes
What an abstract class is, why you'd use one, and worked examples including a comparison against interfaces.
- 57/71
Inner Classes
The four kinds of inner classes in Java — nested, local, anonymous, and static — with worked examples.
- 58/71
Static Members
Static variables, methods, and nested classes in Java, and when to reach for each.
- 59/71
The final Keyword
The three uses of Java's final keyword — final variables, methods, and classes.
- 60/71
Singleton Class
A worked example of the singleton pattern in Java, using a private constructor and a static getInstance() method.
- 61/71
Lambda Expressions
Functional interfaces, lambda syntax with zero/one/multiple parameters, variable capture rules, and passing lambdas as method arguments.
- 62/71
Method References
Referencing static and instance methods directly with the :: operator instead of writing a lambda wrapper.
- 63/71
Streams & I/O
Byte and character streams in Java — reading/writing files, copying between streams, and working with in-memory byte arrays.
- 64/71
OO Design Basics (Head First Java)
The state-vs-behavior framing for designing a class — what an object knows vs. what it does.
- 65/71
DTOs, Controllers, Services & Mappers
How DTOs, controllers, services, and mappers relate in a Spring app, worked through a request DTO and a separate response DTO for the same entity.
- 66/71
Connecting to H2 (Database & Console)
Wiring up the H2 in-memory database and its web console in a Spring Boot app, plus a full JdbcClient-based repository example.
- 67/71
Connecting to a Real Database
Configuring a real datasource in application.properties, picking JDBC vs Spring Data JPA, and getting CRUD for free with ListCrudRepository.
- 68/71
Varargs
Passing a variable number of arguments to a Java method, how they're processed as an array, and how they interact with fixed parameters and array arguments.
- 69/71
Spring: Best Practices to Explore
A short running list of Spring best practices worth adopting.
- 70/71
Aspect-Oriented Programming
AOP fundamentals — aspects, advice, pointcuts, and join points — plus a working example demonstrating all five advice types, and how AOP differs structurally from OOP.
- 71/71
Java: Curated Links
Curated links on Spring Boot, JOOQ, testing, generics, and reflection for Java development.