You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/12/17 11:12:02 UTC

[GitHub] [dolphinscheduler] liugddx opened a new issue, #13210: [Improvement][all] Field injection is not recommended Inspection info: Spring Team recommends: "Always use constructor based dependency injection in your beans. Always use assertions for mandatory dependencies".

liugddx opened a new issue, #13210:
URL: https://github.com/apache/dolphinscheduler/issues/13210

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
   
   
   ### Description
   
   I found out that our project uses @Autowired, spring Team recommends: "Always use constructor based dependency injection in your beans. Always use assertions for mandatory dependencies".
   https://blog.marcnuri.com/field-injection-is-not-recommended.
   So I think this is a needed optimization point.
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #13210: [Improvement][all] Field injection is not recommended Inspection info: Spring Team recommends: "Always use constructor based dependency injection in your beans. Always use assertions for mandatory dependencies".

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #13210:
URL: https://github.com/apache/dolphinscheduler/issues/13210#issuecomment-1441043333

   This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] liugddx commented on issue #13210: [Improvement][all] Field injection is not recommended Inspection info: Spring Team recommends: "Always use constructor based dependency injection in your beans. Always use assertions for mandatory dependencies".

Posted by GitBox <gi...@apache.org>.
liugddx commented on issue #13210:
URL: https://github.com/apache/dolphinscheduler/issues/13210#issuecomment-1360878425

   > this is just a IDEA warnning, but i do think that construct will better than`@Autowired`, In terms of readability, `@Autowired` is better, and if we will inject many beans, o huge constuct may not be a good idea. WDYT
   
   Thanks for the reply, if you write the constructor directly, it will make the code poorly readable, but we use lombok to solve this problem. In addition, this is not just a warning from IDEA, you can see https://blog.marcnuri.com/field-injection-is-not-recommended for details. Of course, the purpose of my mentioning this PR is to lower my contribution threshold, and I am happy to contribute my strength to dolphinscheduler.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] zhongjiajie commented on issue #13210: [Improvement][all] Field injection is not recommended Inspection info: Spring Team recommends: "Always use constructor based dependency injection in your beans. Always use assertions for mandatory dependencies".

Posted by "zhongjiajie (via GitHub)" <gi...@apache.org>.
zhongjiajie commented on issue #13210:
URL: https://github.com/apache/dolphinscheduler/issues/13210#issuecomment-1536990859

   not stale


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #13210: [Improvement][all] Field injection is not recommended Inspection info: Spring Team recommends: "Always use constructor based dependency injection in your beans. Always use assertions for mandatory dependencies".

Posted by github-actions.
github-actions[bot] commented on issue #13210:
URL: https://github.com/apache/dolphinscheduler/issues/13210#issuecomment-1399653904

   This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] DarkAssassinator commented on issue #13210: [Improvement][all] Field injection is not recommended Inspection info: Spring Team recommends: "Always use constructor based dependency injection in your beans. Always use assertions for mandatory dependencies".

Posted by GitBox <gi...@apache.org>.
DarkAssassinator commented on issue #13210:
URL: https://github.com/apache/dolphinscheduler/issues/13210#issuecomment-1359319513

   this is just a IDEA warnning, but i do think that construct will better than`@Autowired`, In terms of readability, `@Autowired` is better, and if we will inject many beans, o huge constuct may not be a good idea. WDYT


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] liugddx commented on issue #13210: [Improvement][all] Field injection is not recommended Inspection info: Spring Team recommends: "Always use constructor based dependency injection in your beans. Always use assertions for mandatory dependencies".

Posted by GitBox <gi...@apache.org>.
liugddx commented on issue #13210:
URL: https://github.com/apache/dolphinscheduler/issues/13210#issuecomment-1356930549

   > Hi @liugddx , may I ask whether you plan to wipe out all the `@Automwired` annotations in this project, or just part of them?
   
   I am going to replace all `@Automwired` annotations in this project.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] EricGao888 commented on issue #13210: [Improvement][all] Field injection is not recommended Inspection info: Spring Team recommends: "Always use constructor based dependency injection in your beans. Always use assertions for mandatory dependencies".

Posted by GitBox <gi...@apache.org>.
EricGao888 commented on issue #13210:
URL: https://github.com/apache/dolphinscheduler/issues/13210#issuecomment-1356824850

   Hi @liugddx , may I ask whether you plan to wipe out all the `@Automwired` annotations in this project, or just part of them?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] liugddx commented on issue #13210: [Improvement][all] Field injection is not recommended Inspection info: Spring Team recommends: "Always use constructor based dependency injection in your beans. Always use assertions for mandatory dependencies".

Posted by GitBox <gi...@apache.org>.
liugddx commented on issue #13210:
URL: https://github.com/apache/dolphinscheduler/issues/13210#issuecomment-1356716692

   > This pr has changed a lot, so I split the task, and friends who need to participate can also claim it.
   
   @EricGao888 @SbloodyS do you have any suggestions?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] github-actions[bot] closed issue #13210: [Improvement][all] Field injection is not recommended Inspection info: Spring Team recommends: "Always use constructor based dependency injection in your beans. Always use assertions for mandatory dependencies".

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #13210: [Improvement][all] Field injection is not recommended Inspection info: Spring Team recommends: "Always use constructor based dependency injection in your beans. Always use assertions for mandatory dependencies".
URL: https://github.com/apache/dolphinscheduler/issues/13210


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #13210: [Improvement][all] Field injection is not recommended Inspection info: Spring Team recommends: "Always use constructor based dependency injection in your beans. Always use assertions for mandatory dependencies".

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #13210:
URL: https://github.com/apache/dolphinscheduler/issues/13210#issuecomment-1356184187

   Thank you for your feedback, we have received your issue, Please wait patiently for a reply.
   * In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
   * If you haven't received a reply for a long time, you can [join our slack](https://s.apache.org/dolphinscheduler-slack) and send your question to channel `#troubleshooting`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #13210: [Improvement][all] Field injection is not recommended Inspection info: Spring Team recommends: "Always use constructor based dependency injection in your beans. Always use assertions for mandatory dependencies".

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #13210:
URL: https://github.com/apache/dolphinscheduler/issues/13210#issuecomment-1451088515

   This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] liugddx commented on issue #13210: [Improvement][all] Field injection is not recommended Inspection info: Spring Team recommends: "Always use constructor based dependency injection in your beans. Always use assertions for mandatory dependencies".

Posted by GitBox <gi...@apache.org>.
liugddx commented on issue #13210:
URL: https://github.com/apache/dolphinscheduler/issues/13210#issuecomment-1356716272

   This pr has changed a lot, so I split the task, and friends who need to participate can also claim it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] EricGao888 commented on issue #13210: [Improvement][all] Field injection is not recommended Inspection info: Spring Team recommends: "Always use constructor based dependency injection in your beans. Always use assertions for mandatory dependencies".

Posted by GitBox <gi...@apache.org>.
EricGao888 commented on issue #13210:
URL: https://github.com/apache/dolphinscheduler/issues/13210#issuecomment-1363993667

   > > Hi @liugddx , may I ask whether you plan to wipe out all the `@Automwired` annotations in this project, or just part of them?
   > 
   > Please tell me if this is a meaningful issue? If not, I will close the issue and related pr, thanks.
   
   I'm +1 to this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] liugddx commented on issue #13210: [Improvement][all] Field injection is not recommended Inspection info: Spring Team recommends: "Always use constructor based dependency injection in your beans. Always use assertions for mandatory dependencies".

Posted by GitBox <gi...@apache.org>.
liugddx commented on issue #13210:
URL: https://github.com/apache/dolphinscheduler/issues/13210#issuecomment-1356934173

   Another good `good first issue` that I think I can contribute to is to replace logging with @Slf4j.You can contribute and don't need to be very familiar with the system. I think this is very friendly.I would also like to contribute in this way.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [dolphinscheduler] liugddx commented on issue #13210: [Improvement][all] Field injection is not recommended Inspection info: Spring Team recommends: "Always use constructor based dependency injection in your beans. Always use assertions for mandatory dependencies".

Posted by GitBox <gi...@apache.org>.
liugddx commented on issue #13210:
URL: https://github.com/apache/dolphinscheduler/issues/13210#issuecomment-1363554181

   > Hi @liugddx , may I ask whether you plan to wipe out all the `@Automwired` annotations in this project, or just part of them?
   
   Please tell me if this is a meaningful issue? If not, I will close the issue and related pr, thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org