Steps involved in Spring web MVC application development.
1) create new maven project, select maven-archetype-web.
2) add web server(tomcat).
3) add spring-webmvc and tomcat dependency in pom.xml.
4) create beans configured Java/xml file.
5) write
business logic inside src/main/java.
Java Program
pom.xml
web.xml
spring-servlet.xml
deposite.jsp withdraw.jsp
project Structure
Note: spring
beans we can configure in 3 ways
1) xml
based configuration file
Configure <beans> inside beans.xml file
2) annotation-based
configuration
Configure
<context:annotation-config/> inside beans.xml file and use annotations
inside Java class.
3) Java
based configuration
Configurations
happen in Java file without xml file.
with the help of annotations like @configuration, @beans, @component, @service, @controller..etc.!
No comments:
Post a Comment