学习新东西的的第一个程序——HelloWorld,以下是SpringMVC的HelloWorld
用MAVEN创建WEBAPP,并导入依赖。
这是pom.xml:
<dependencies> <dependency> <groupId>${springframework.gid}</groupId> <artifactId>spring-core</artifactId> </dependency> <dependency> <groupId>${springframework.gid}</groupId> <artifactId>spring-beans</artifactId> </dependency> <dependency> <groupId>${springframework.gid}</groupId> <artifactId>spring-context</artifactId> </dependency> <dependency> <groupId>${springframework.gid}</groupId> <artifactId>spring-expression</artifactId> </dependency> <dependency> <groupId>${springframework.gid}</groupId> <artifactId>spring-web</artifactId> </dependency> <dependency> <groupId>${springframework.gid}</groupId> <artifactId>spring-webmvc</artifactId> </dependency> <dependency> <groupId>${springframework.gid}</groupId> <artifactId>spring-aop</artifactId> </dependency> </dependencies>
不使用maven的,可以直接导入以上几个jar(强烈推荐使用MAVEN,MAVEN学习书籍和视频:MAVEN实战,孔浩MAVEN视频)
时间: 2024-10-06 17:57:55