search

Home  >  Q&A  >  body text

java - The Controller layer of spring still needs to write @Resource to inject the service layer object. Is this decoupling?

1. The Controller layer of spring still needs to write @Resource to inject the service layer object. Is this decoupling?

欧阳克欧阳克2757 days ago1007

reply all(2)I'll reply

  • 为情所困

    为情所困2017-06-23 09:14:59

    Controller relies on Service for logic processing. It cannot be completely decoupled. It can only reduce the coupling between each other. If Spring is not used, calling Service to process business logic will be more complicated.

    reply
    0
  • 習慣沉默

    習慣沉默2017-06-23 09:14:59

    This is not about decoupling or not, but DI can reduce coupling.

    reply
    0
  • Cancelreply