-
-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
Implemented Monolithic Architecture according to the guidelines provided by issue #2664 #3111
base: master
Are you sure you want to change the base?
Conversation
…ructure, and added basic model files using H2 database since its light and efficient
…ructure, and added basic model files using H2 database since its light and efficient
…se to maintain code cleanliness
# Conflicts: # Monolithic-Ecommerce/src/main/java/com/iluwatar/monolithic/model/Orders.java # Monolithic-Ecommerce/src/main/java/com/iluwatar/monolithic/model/Products.java # Monolithic-Ecommerce/src/main/java/com/iluwatar/monolithic/model/User.java
…asses and used the CLI main class from the previous submission and enhanced upon it
Added Detailed Readme File in the md format
I am aware of the 40% coverage i'll be adding more test cases and submitting another PR |
added more test cases, and tried to fix pom.xml
Monolithic-Ecommerce/README.md
Outdated
@@ -0,0 +1,126 @@ | |||
## Monolithic-Ecommerce App |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
README.md has a specific structure that each example needs to implement. See here: https://github.com/iluwatar/java-design-patterns/wiki/01.-How-to-contribute
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could use monolithic-architecture as the folder/module name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll revise them as soon as possible
Monolithic-Ecommerce/pom.xml
Outdated
</dependency> | ||
</dependencies> | ||
</project> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include maven-assembly-plugin so that we can execute the app from the command line. See other patterns for examples.
/** | ||
* Main entry point for the Monolithic E-commerce application. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explain monolithic architecture brieftly. Describe how the code example implements it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought i went over it as much as i could in the Readme file but i'll include a brief introduction here as well
User user = userRepository.findById(userId).orElse(null); | ||
if (user == null) { | ||
throw new NonExistentUserException("User with ID " + userId + " not found"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could use orElseThrow
in this situation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes a lot more sense, I'll revise the code to make sure no other statements stand out like this
Quality Gate passedIssues Measures |
What problem does this PR solve?
this PR relates to issue #2664, it contains an example for the Monolithic Architecture using MVC file structure, it also builds upon the previously abandoned code and uses a couple of time saving utilities such as Spring Data JPA and Mockito.