This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Spring Boot 3.x application using Maven with Java 21. Code formatting is enforced using the Spring Java Format plugin.
Build Commands:
./mvnw clean spring-javaformat:apply package # Build application
./mvnw spring-boot:run # Run application locally
./mvnw spring-javaformat:apply test # Run all tests- Package:
am.ik.blog- Main application package - Domain:
am.ik.blog.entry- Blog entry domain model and repository - Config:
am.ik.blog.config- GemFire and application configuration - Markdown:
am.ik.blog.markdown- Markdown processing with YAML front matter - Web:
am.ik.blog.entry.web- REST API controllers
- Entry: Main blog entry entity with ID, title, content, categories, tags, frontMatter
- Author: Author information with name, URL, GitHub
- Category/Tag: Simple categorization entities
- FrontMatter: YAML metadata container
- Spring Boot 3.5
- VMware GemFire 10.1
- Java 21
- Jilt for builder pattern generation
- Repository Pattern:
EntryRepositorywith dual-source strategy (cache + external API) - Builder Pattern: Generated via
@Builderannotation from Jilt - Record Classes: Used for configuration properties (
EntryProps)
- Java 25 runtime
- Use builder pattern if the number of arguments is more than two
- Write javadoc and comments in English
- Spring Java Format enforced via Maven plugin
- All code must pass formatting validation before commit
- Use Java 25 compatible features
- Use modern Java technics as much as possible like Java Records, Pattern Matching, Text Block etc ... but don't use "var".
- Be sure to avoid circular references between classes and packages.
- Don't use Lombok.
- Don't use Google Guava.
- Always use constructor injection for Spring beans. No
@Autowiredrequired except for test code. - Use
RestClientfor external API calls. Don't useRestTemplate. RestClientshould be used with injected/autoconfiguredRestClient.Builder.- Use
JdbcClientfor database operations. Don't useJdbcTemplateexcept for batch update. - Use
@Configuration(proxyBeanMethods = false)for configuration classes to avoid proxying issues. - Use
@ConfigurationProperties+ Java Records for configuration properties classes. Don't use@Valuefor configuration properties. - Use
@DefaultValuefor non-null default values in configuration properties classes.
Package structure should follow the "package by feature" principle, grouping related classes
together. Not by technical layers.
Exceptionally, web related classes including Controllers should be located in web package under the
feature package. Other layers should not have dedicated packages like "service", "repository", "dto"
etc...
web package should not be shared across different features. Each feature should have its own web
domain objects should be clean and not contain external layers like web or database.
For DTOs, use inner record classes in the appropriate classes. For example, if you have a
UserController, define the request/response class inside that controller class.
:
- Unit Tests: JUnit 5 with AssertJ for service layer testing
- Integration Tests:
@SpringBootTest+ Testcontainers for full application context - Test Data Management: Use
@TempDirfor filesystem testing, maintain test independence - All tests must pass before completing tasks
- Test coverage includes artifact operations, repository browsing, and API endpoints
- Ensure all code is formatted using
./mvnw spring-javaformat:apply - For each task, notify that the task is complete and ready for review by the following command:
osascript -e 'display notification "<Message Body>" with title "<Message Title>"’