Spring + Spring MVC + Mybatis 云笔记项目(一)项目搭建

开发工具:eclipse + navicat 

项目源码:CSDN下载地址

Github:Github源码地址

一、新建 maven 项目

File -> New -> Project -> Maven -> Maven Project

Next -> create s simple project  -> next

 

 填写项目基本信息 -> Finish

 

项目目录

二、添加项目需要的Jar包

打开项目根目录下面的 pom.xml ,切换到  pom.xml Tab 页,

将以下内容复制进 文件中

 <dependencies>
  		 <dependency>
	  <groupId>org.springframework</groupId>
	  <artifactId>spring-webmvc</artifactId>
	  <version>4.1.8.RELEASE</version>
	</dependency>
  	<dependency>
	  <groupId>org.mybatis</groupId>
	  <artifactId>mybatis</artifactId>
	  <version>3.4.6</version>
	</dependency>
  	<dependency>
  		<groupId>commons-dbcp</groupId>
  		<artifactId>commons-dbcp</artifactId>
  		<version>1.4</version>
  	</dependency>
  	<dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>5.1.25</version>
      <scope>compile</scope>
    </dependency>
  	<dependency>
	  <groupId>org.mybatis</groupId>
	  <artifactId>mybatis-spring</artifactId>
	  <version>1.3.0</version>
	</dependency>
  	<dependency>
	  <groupId>org.springframework</groupId>
	  <artifactId>spring-jdbc</artifactId>
	  <version>4.1.8.RELEASE</version>
	</dependency>
  	<dependency>
	 	<groupId>junit</groupId>
	 	<artifactId>junit</artifactId>
	 	<version>3.8.1</version>
	 </dependency>
	 <dependency>
  	 	<groupId>com.fasterxml.jackson.core</groupId>
  	 	<artifactId>jackson-annotations</artifactId>
  	 	<version>2.2.3</version>
  	 </dependency>
  	 <dependency>
  	 	<groupId>com.fasterxml.jackson.core</groupId>
  	 	<artifactId>jackson-core</artifactId>
  	 	<version>2.2.3</version>
  	 </dependency>
  	 <dependency>
  	 	<groupId>com.fasterxml.jackson.core</groupId>
  	 	<artifactId>jackson-databind</artifactId>
  	 	<version>2.2.3</version>
  	 </dependency>
  	 <dependency>
  	 	<groupId>org.aspectj</groupId>
  	 	<artifactId>aspectjweaver</artifactId>
  	 	<version>1.8.0</version>
  	 </dependency>
   </dependencies>

保存文件后项目会自动下载相关的Jar包,并保存在电脑上,其它项目可直接添加Dependencies,不会重复下载。如下截图已经添加了相关jar包的引用

 打开 index.jsp  -> 右键 debug on server (tomcat server已添加) 出现以下界面表示项目搭建完成并运行成功

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值