cloud-native-toolkit / cloud-native-toolkit/planning

Mike wants the Template-Java-Spring modernized

Open
#765 3 comments 0 reactions 0 assignees View on GitHub
code pattern feature Persona: Developer
Dominant language
No language data
Stars
4
Forks
1
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
Things that could be improved with the current Template-Java-Spring. It currently:
- Uses spring fox for OpenAPI2 instead of springdoc libraries for OpenAPI3
- Demonstrates localization of GreetingService without using Spring localization libraries (message bundles and an AcceptHeaderLocaleResolver)
- Does not leverage JavaX validation on request objects, and instead preforms conditional checks.
- Doesn’t implement a rest exception handler using controller advice or return a customized error response to prevent info leakage.
- Health check doesn’t leverage the spring boot actuator
- Maybe show some AOP for trace logging, also implement CommonsRequestLoggingFilter
- Maybe add a Pom file in addition to the build.gradle for shops that don’t want to move to gradle.
- Use functional programming / lamdas when possible

**Which persona(s) does this feature benefit (e.g. developer, SRE, etc)?**
Developer

**What is the impact of not having this feature? What will be the benefit of having this feature?**
In as quantifiable terms as possible describe the value brought by this feature. E.g. this task is performed repeatedly and this feature will reduce the time required by 5 minutes and reduce error each time

**Describe the solution you'd like**
Here is an example github repo where spring boot is implemented in a way that demonstrates all of the items listed above.
https://github.com/michaelsteven/springboot-items-api.

**Describe alternatives you've considered**
Starting a project with the Template-Java-Spring and manually changing the project

**Additional context**
None.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.