-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(1): common services rework #201
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
updating pom file to add build and properties
adding apache commons lang 3 as a dependency
refactoring a small portion of the code to: - comply with checkstyle guideline - use records when possible - removed interfaces for services
removed a few dependencies as they are not required: - jakarta.inject-api - commons-collections - jettison - spring-context-indexer Fix #188
Entity classes are supposed to be session-bounded. By annotating a class with @component you're flagging it for spring to instantiate it as a managed bean, keeping it as a singleton. As an entity is supposed to be just a data holder for the database, it makes no sense to use it as a component. The scope controls the component scope or in simple words, marks how spring will control this singleton lifecycle. You can set a scope per user session (meaning that a bean will exist for each user session) or more global. Fix #188
Entity classes are supposed to be session-bounded. By annotating a class with @component you're flagging it for spring to instantiate it as a managed bean, keeping it as a singleton. As an entity is supposed to be just a data holder for the database, it makes no sense to use it as a component. The scope controls the component scope or in simple words, marks how spring will control this singleton lifecycle. You can set a scope per user session (meaning that a bean will exist for each user session) or more global. Fix #188
adding lombok as a dependency and refactoring the code to make use of it. Lombok reduces the boilerplate code by annotating classes that will generate the actual content during build time. removed `Serializable` interface from entities. Even being a best practice to mark entities as serializable, you only need to mark it if you need to transfer them over-the-wire (serialize them to some other representation), store them in http session (which is in turn serialized to hard disk by the servlet container), or even persist it as a binary content. as stated on JPA specification: If an entity instance is to be passed by value as a detached object (e.g., through a remote interface), the entity class must implement the Serializable interface. in our case, hibernate will pass it as a reference, and update the fields on the database even if we do not set it as `Serializable` Fix #188
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.11.12 to 18.11.15. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Derek Roberts <[email protected]> Co-authored-by: MCatherine <[email protected]>
#186) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.46.0 to 5.46.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.46.1/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat/frontend: added check duplicate api to frontend, refs: #190 * feat/frontend: reinstalled node packages, refs: #190 * feat/pipeline: adjust memory request for deployment yaml file * feat/frontend: added example for generate form based on json schema, refs: #50 * Exclude example dir from SonarCloud * Comment out placeholder file Co-authored-by: Derek Roberts <[email protected]>
refactoring a small portion of the code to: - comply with checkstyle guideline - use records when possible - removed interfaces for services
removed a few dependencies as they are not required: - jakarta.inject-api - commons-collections - jettison - spring-context-indexer Fix #188
adding lombok as a dependency and refactoring the code to make use of it. Lombok reduces the boilerplate code by annotating classes that will generate the actual content during build time. removed `Serializable` interface from entities. Even being a best practice to mark entities as serializable, you only need to mark it if you need to transfer them over-the-wire (serialize them to some other representation), store them in http session (which is in turn serialized to hard disk by the servlet container), or even persist it as a binary content. as stated on JPA specification: If an entity instance is to be passed by value as a detached object (e.g., through a remote interface), the entity class must implement the Serializable interface. in our case, hibernate will pass it as a reference, and update the fields on the database even if we do not set it as `Serializable` Fix #188
adding lombok as a dependency and refactoring the code to make use of it. Lombok reduces the boilerplate code by annotating classes that will generate the actual content during build time. removed `Serializable` interface from entities. Even being a best practice to mark entities as serializable, you only need to mark it if you need to transfer them over-the-wire (serialize them to some other representation), store them in http session (which is in turn serialized to hard disk by the servlet container), or even persist it as a binary content. as stated on JPA specification: If an entity instance is to be passed by value as a detached object (e.g., through a remote interface), the entity class must implement the Serializable interface. in our case, hibernate will pass it as a reference, and update the fields on the database even if we do not set it as `Serializable` Fix #188
removing SwaggerConfiguration.java as it is not required anymore. updating OraclePersistenceConfiguration and PostgresPersistenceConfiguration for better maintainability. moved configurations to reside inside YML file and reused properties file for build purpose. added documentation folder with initial compose file.
github-actions
bot
added
feature
and removed
documentation
Improvements or additions to documentation
labels
Dec 22, 2022
github-actions
bot
added
documentation
Improvements or additions to documentation
feature
and removed
feature
documentation
Improvements or additions to documentation
labels
Dec 23, 2022
github-actions
bot
added
documentation
Improvements or additions to documentation
feature
and removed
feature
documentation
Improvements or additions to documentation
labels
Dec 30, 2022
paulushcgcj
changed the title
feat: common services rework
feat(1): common services rework
Dec 30, 2022
github-actions
bot
added
documentation
Improvements or additions to documentation
feature
and removed
feature
documentation
Improvements or additions to documentation
labels
Dec 30, 2022
13 tasks
github-actions
bot
added
documentation
Improvements or additions to documentation
feature
and removed
feature
documentation
Improvements or additions to documentation
labels
Jan 4, 2023
[forest-client-frontend] Kudos, SonarCloud Quality Gate passed! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backend
code related to the java backend application
configuration
changes related to configuration file
controller
changes related to an api controller
dto
This change includes DTO (Data Transfer Object) changes. Please check for contract changes
entity
this change involves a change on a database entity
feature
github_actions
Pull requests that update GitHub Actions code
java
Pull requests that update Java code
repository
changes related to a database repository and data access
service
changes related to a service
source
source code changes
tests
test classes changes
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This change is a rework of the common services package to be more in line with the best practices of spring boot 3 and java 17
Type of change
How Has This Been Tested?
The existing tests contained in the project are too minimal to be considered valid. Due to that, new tests should be added, including stubs when required.
Checklist
Further comments
This pull request depends on #193 to be merged first.
Thanks for the PR!
Any successful deployments (not always required) will be available below.
Backend available
Frontend available
Once merged, code will be promoted and handed off to following workflow run.
Main Merge Workflow
Thanks for the PR!
Any successful deployments (not always required) will be available below.
Backend available
Frontend available
Once merged, code will be promoted and handed off to following workflow run.
Main Merge Workflow