dispatcher-servlet.xml和application-context.xml [英] dispatcher-servlet.xml and application-context.xml

查看:61
本文介绍了dispatcher-servlet.xml和application-context.xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 为什么我们使用调度程序
    servlet.xml?

  2. 是否类似于web.xml?

  3. 申请和调度员xmls
    是否彼此不同,是否有
    任何类似的东西都可以
    吗?

  4. 我有一个值,现在我需要将
    发送给另一个班级?我可以通过
    application-context.xml

  1. Why do we use dispatcher servlet.xml?
  2. Is it something like web.xml?
  3. Is application and dispatcher xmls different from each other, are there any similar things which both can do?
  4. I have a value, now i need to send it to another class? can i do it via application-context.xml


推荐答案


  1. 因为人们不想要一个庞大的应用程序context.xml,所以他们会按应用程序层拆分它们。

  1. Because people don't want one humongous application-context.xml, they split them up by application layer.

不,它是只是一个Spring应用程序上下文文件。

No, it's just a Spring application context file.

他们做同样的事情。

那是不是它的用途,而是用于定义弹簧管理对象的注入对象。

That's not what it's for, it's for defining what your spring-managed objects get injected with.

这篇关于dispatcher-servlet.xml和application-context.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆