Skip to content

Commit afe4c89

Browse files
author
Yuriy Bezsonov
committed
requirements for java25-spring-modernization
1 parent e830a6e commit afe4c89

3 files changed

Lines changed: 89 additions & 241 deletions

File tree

.kiro/specs/java25-spring-modernization/requirements.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,19 @@ When a Java/Spring developer sees this application, they should think:
225225
2. THE Application SHALL use meaningful variable and method names
226226
3. THE Application SHALL follow consistent code formatting
227227
4. THE Dockerfiles SHALL include comments explaining each optimization technique
228+
5. THE Application SHALL use Spotless with Palantir Java Format for automated code formatting
229+
6. THE pom.xml SHALL be organized with sortpom plugin for consistent dependency ordering
230+
7. THE application.yaml SHALL be organized with logical sections and explanatory comments
231+
232+
### Requirement 19: Clean Configuration for Microservices
233+
234+
**User Story:** As a workshop attendee, I want to see production-ready microservice configuration, so that I can understand best practices for containerized Java applications.
235+
236+
#### Acceptance Criteria
237+
238+
1. THE Application SHALL configure graceful shutdown for container orchestration
239+
2. THE Application SHALL configure appropriate connection pool sizes for containerized deployment
240+
3. THE Application SHALL configure proper request timeouts
241+
4. THE Application SHALL use structured logging suitable for container environments
242+
5. THE Application SHALL externalize all environment-specific configuration via environment variables
243+
6. THE pom.xml SHALL NOT contain unused dependencies

.kiro/specs/java25-spring-modernization/tasks.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,79 @@ This implementation plan transforms unicorn-store-spring-java25 into a showcase
246246
- Add jqwik dependency version 1.9.3 with test scope
247247
- _Requirements: Testing Strategy_
248248

249+
- [ ] 15. Add Code Formatting with Spotless
250+
- [ ] 15.1 Add Spotless Maven plugin to pom.xml
251+
- Add spotless-maven-plugin version 2.44.4
252+
- Configure with Palantir Java Format
253+
- Add removeUnusedImports configuration
254+
- _Requirements: 18.3_
255+
256+
- [ ] 15.2 Add EditorConfig for IDE consistency
257+
- Create `.editorconfig` file in project root
258+
- Configure indent_style=space, indent_size=4
259+
- Configure end_of_line=lf, charset=utf-8
260+
- _Requirements: 18.3_
261+
262+
- [ ] 15.3 Run Spotless to format all code
263+
- Execute `mvn spotless:apply` to format codebase
264+
- Verify no formatting issues with `mvn spotless:check`
265+
- _Requirements: 18.3_
266+
267+
- [ ] 16. Clean Up pom.xml with sortpom
268+
- [ ] 16.1 Add sortpom-maven-plugin to pom.xml
269+
- Add sortpom-maven-plugin version 4.0.0
270+
- Configure to sort dependencies, plugins, and properties
271+
- Configure indentation and line separator
272+
- _Requirements: 18.3_
273+
274+
- [ ] 16.2 Reorganize pom.xml structure
275+
- Group properties: Java version → Encoding → Dependency versions
276+
- Group dependencies: Spring Boot → AWS SDK → Database → Observability → Test
277+
- Remove unused S3 and DynamoDB dependencies
278+
- Add comments for dependency groups
279+
- Run `mvn sortpom:sort` to apply ordering
280+
- _Requirements: 18.3, 1.3_
281+
282+
- [ ] 17. Clean Up application.yaml
283+
- [ ] 17.1 Reorganize application.yaml with logical sections
284+
- Add section comments: # === Database Configuration ===
285+
- Group: Spring Core → Database → JPA → Server → Management/Actuator
286+
- Remove redundant/default settings
287+
- Add comments explaining non-obvious settings (e.g., hikari pool size for containers)
288+
- _Requirements: 18.1, 18.3_
289+
290+
- [ ] 17.2 Review and optimize configuration for microservices
291+
- Ensure graceful shutdown is configured
292+
- Verify health probes are production-ready
293+
- Add appropriate timeouts for container environments
294+
- Configure proper logging levels
295+
- _Requirements: 16.1, 16.2, 16.3_
296+
297+
- [ ] 18. Final Code Quality Review
298+
- [ ] 18.1 Review package structure
299+
- Verify clean separation: controller → service → data → model
300+
- Ensure no circular dependencies
301+
- Check that each class has single responsibility
302+
- _Requirements: 18.2_
303+
304+
- [ ] 18.2 Fix unused blackhole variable in ThreadGeneratorService
305+
- Properly use the blackhole variable to prevent dead code elimination
306+
- Add comment explaining why volatile blackhole pattern is used
307+
- _Requirements: 18.2_
308+
309+
- [ ] 18.3 Review and clean up imports
310+
- Remove unused imports across all files
311+
- Ensure consistent import ordering
312+
- No wildcard imports
313+
- _Requirements: 18.3_
314+
315+
- [ ] 18.4 Final polish
316+
- Verify all TODO comments are resolved
317+
- Ensure consistent naming conventions
318+
- Check all public methods have appropriate Javadoc
319+
- Verify no commented-out code remains
320+
- _Requirements: 18.1, 18.2, 18.3_
321+
249322
## Notes
250323

251324
- All tasks are required for comprehensive modernization

apps/unicorn-store-spring-java25/IMPROVEMENTS.md

Lines changed: 0 additions & 241 deletions
This file was deleted.

0 commit comments

Comments
 (0)