-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Upgrade spring boot to 3.x latest #149
base: master
Are you sure you want to change the base?
Conversation
3082654
to
7b18b4d
Compare
@@ -4,7 +4,7 @@ | |||
* An entity, as explained in the DDD book. | |||
* | |||
*/ | |||
public interface Entity<T> { | |||
public interface DomainEntity<T> { |
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.
Why was this class renamed? Was it to avoid a namespace collision with JPA?
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.
yes, IMHO, this class should not use a single word.
@@ -39,7 +40,8 @@ | |||
@RequestMapping("/admin") | |||
public final class CargoAdminController { | |||
|
|||
private final BookingServiceFacade bookingServiceFacade; | |||
@Autowired |
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.
Can this dependency be injected into the constructor instead?
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 think it's hard and dangerous to do it since the injection currently has some circular.
It's the next step I'm planning.
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.
Okay, got it. In that case, could you add a comment to this field explaining that it cannot be moved into the constructor params due to the circular dependency problem? Otherwise, my knee-jerk reaction seeing that autowired field would be to inline 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 got the reason by new investigation and make it inline with constructor
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.
May I know why some beans are defined in the context file (like DDDSampleApplicationContext) but some are defined by the annotation?
I think the domain layer should not have the runtime knowledge like CDI, but the infrastructure and interfaces may can do it.
I have some idea for optimizing the bean definitions to:
- no circular reference
- no duplicate bean definition
But I'm wondering about how to define the beans with the original principle.
Why
Due to #141 , It's necessary to update the project with the latest spring boot version.
The DDD simple should have the modern technical stack to show how ddd gets implemented.
So, the project can be welcome to new committer with more ideas and best practices.
What