Tag Archives: springmvc

Define bean in SpringMVC

Today, I tested from scratch to see how to use bean in SpringMVC. The conclusion is that we can either use @Component or xml to define bean. First, I used Intellij to create a HelloWorld SpringMVC project. Then I added a TestClass bean which I hope to get it from container. The project structure is like below:… Read More »