IntelliJ IDEA搭建SSM框架并实现页面登录功能连接数据库

一、框架搭建前期环境准备

二、搭建框架

  1. 打开intellij idea.出现如下的界面,这时候我们先对Maven的地址进行配置一下吧,点击Configure我们选择preference;
    在这里插入图片描述
    这时候会直接跳转到Maven配置界面如下图所示,这是我们主要配置三个地方,Maven home directory请选择你maven的安装路径,User setting file这是我们前面提到的仓库和阿里镜像的配置文件,Local repository是配置仓库的地址配置完毕我们选择apply然后Ok;
    在这里插入图片描述在这里插入图片描述
  2. 然后点击下一步,我们看到下面的界面 ,GroupID是项目组织唯一的标识符, 比如我的项目叫test001 那么GroupID应该是 com.lixiaoming.test001 域名.公司名.项目名,ArtifactID就是项目的唯一的标识符, 一般是 项目名-xxx 比如test001-model

  1. 继续下一步,如下图显示项目名称和你的项目本地地址。

在这里插入图片描述
点击完成,项目结构算是搭建起来了
在这里插入图片描述

三、搭建目录结构

在这里插入图片描述

四.文件配置内容

首先我们要在pox.xml中引进我们需要的jar包,在地址:http://mvnrepository.com/里面搜素自己需要的jar包,因为要进行下载会有点慢,需要耐心等待一下,这时我们配置SSM其他的文件。

<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>8.0.13</version>
</dependency>

    <!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>3.1.0</version>
      <scope>provided</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/javax.servlet.jsp/javax.servlet.jsp-api -->
    <dependency>
      <groupId>javax.servlet.jsp</groupId>
      <artifactId>javax.servlet.jsp-api</artifactId>
      <version>2.2.1</version>
      <scope>provided</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
    <dependency>
      <groupId>com.alibaba</groupId>
      <artifactId>fastjson</artifactId>
      <version>1.2.47</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/taglibs/standard -->
    <dependency>
      <groupId>taglibs</groupId>
      <artifactId>standard</artifactId>
      <version>1.1.2</version>
    </dependency>
  

    <!-- https://mvnrepository.com/artifact/javax.servlet/jstl -->
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
      <version>1.1.2</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/commons-dbcp/commons-dbcp -->
    <dependency>
      <groupId>commons-dbcp</groupId>
      <artifactId>commons-dbcp</artifactId>
      <version>1.4</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->
    <dependency>
      <groupId>org.mybatis</groupId>
      <artifactId>mybatis</artifactId>
      <version>3.4.6</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework/spring-aop -->


    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-aop</artifactId>
      <version>5.1.3.RELEASE</version>
    </depende
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值