tags - Questions about spring reference statement and application context -


I have two primary doubts about spring:

  1. By receiving references, we should use methods like this:

    context = new classpathxmlApplicationContext ("applicationContext.xml");

    Should it be called simply through a clear way? I was thinking about this that the spring config file should also be read when the website starts.

  2. When we use tags of other packages like Spring or JSTL, etc. We should give the reference statement as before:

    & lt;% @ taglib prefix = "SF" Yuri = "http://www.springframework.org/tags/form"%>

    I was curious about that when the page is being parsed, the web server downloads this uriy and uses it in this page? But without the Internet, it also works. How it works, or why we should add it to the body of the file.

  1. Obtaining a bean from the spring reference It is actually possible, but this purpose of being with bean containers can be considered defeated. The goal of the container is to provide beans in your classes, so they do not need to interact directly with the reference or catch them. (XML-based) see this for a simple example of DI

  2. If is in your class then uri a Lt;% taglib & gt; The tag can be solved locally under a specific specific path.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -