Announcement Announcement Module
Collapse
No announcement yet.
spring-security-samples-tutorial: What mechanism is loading bank-servlet.xml? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring-security-samples-tutorial: What mechanism is loading bank-servlet.xml?

    Included in the "spring-security-samples-tutorial" sample is a file named WEB-INF/bank-servlet.xml.
    This configuration metadata file is used by the sample to set up two Controllers.

    "bank-servlet.xml" is never referenced in any other configuration file, neither as a context-param in web.xml, nor as an import statement in any other configuration metadata.

    Now I'm curious which mechanism of the Spring Framework loads "bank-servlet.xml".

    Thank you for hints
    Eduard

  • #2
    I suggest a read of the reference guide which explains that quite nicely...

    Comment


    • #3
      Thanks, I found the relevant section.

      "Upon initialization of a DispatcherServlet, Spring MVC looks for a file named [servlet-name]-servlet.xml in the WEB-INF directory of your web application and creates the beans defined there, overriding the definitions of any beans defined with the same name in the global scope."

      Comment

      Working...
      X