ssm框架如何使用IDEA搭建-創(chuàng)新互聯(lián)

ssm框架如何使用IDEA搭建?很多新手對(duì)此不是很清楚,為了幫助大家解決這個(gè)難題,下面小編將為大家詳細(xì)講解,有這方面需求的人可以來(lái)學(xué)習(xí)下,希望你能有所收獲。

創(chuàng)新互聯(lián)主要從事成都網(wǎng)站設(shè)計(jì)、網(wǎng)站建設(shè)、外貿(mào)網(wǎng)站建設(shè)、網(wǎng)頁(yè)設(shè)計(jì)、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務(wù)。立足成都服務(wù)五指山,10年網(wǎng)站建設(shè)經(jīng)驗(yàn),價(jià)格優(yōu)惠、服務(wù)專業(yè),歡迎來(lái)電咨詢建站服務(wù):18980820575

ssm(spring springMVC mybatis)

1.創(chuàng)建項(xiàng)目

file->new->project

ssm框架如何使用IDEA搭建
ssm框架如何使用IDEA搭建
ssm框架如何使用IDEA搭建

2.新建的maven項(xiàng)目目錄結(jié)構(gòu)

ssm框架如何使用IDEA搭建

添加ssm需要的文件夾等

ssm框架如何使用IDEA搭建

如果去掉java文件夾的藍(lán)色標(biāo)志,會(huì)發(fā)現(xiàn)這里new時(shí)不能創(chuàng)建java類或包

ssm框架如何使用IDEA搭建

ssm框架如何使用IDEA搭建

如果main/java前不是藍(lán)色文件夾或test/java前不是綠色文件夾,可以這樣添加

ssm框架如何使用IDEA搭建

ssm框架如何使用IDEA搭建

3.加入maven依賴

pom.xml

<&#63;xml version="1.0" encoding="UTF-8"&#63;>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 <modelVersion>4.0.0</modelVersion>

 <groupId>org.example</groupId>
 <artifactId>ssm3</artifactId>
 <version>1.0-SNAPSHOT</version>
 <packaging>war</packaging>

 <name>ssm3 Maven Webapp</name>
 <!-- FIXME change it to the project's website -->
 <url>http://www.example.com</url>

 <properties>
 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 <maven.compiler.source>1.7</maven.compiler.source>
 <maven.compiler.target>1.7</maven.compiler.target>
 <jackson.version>2.5.4</jackson.version>
 </properties>

 <dependencies>

 <!-- controller返回json -->
 <dependency>
  <groupId>com.fasterxml.jackson.core</groupId>
  <artifactId>jackson-core</artifactId>
  <version>${jackson.version}</version>
 </dependency>

 <dependency>
  <groupId>com.fasterxml.jackson.core</groupId>
  <artifactId>jackson-databind</artifactId>
  <version>${jackson.version}</version>
 </dependency>

 <!-- 引入spring mvc的jar包 -->
 <!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
 <dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-webmvc</artifactId>
  <version>4.3.7.RELEASE</version>
 </dependency>

 <!-- JDBC支持包,包括數(shù)據(jù)源設(shè)置和JDBC訪問(wèn)支持 -->
 <!-- https://mvnrepository.com/artifact/org.springframework/spring-jdbc -->
 <dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-jdbc</artifactId>
  <version>4.3.7.RELEASE</version>
 </dependency>


 <!-- Spring提供對(duì)AspectJ框架的整合 -->
 <!-- https://mvnrepository.com/artifact/org.springframework/spring-aspects -->
 <dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-aspects</artifactId>
  <version>4.3.7.RELEASE</version>
 </dependency>


 <!-- mybatis依賴包 -->
 <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->
 <dependency>
  <groupId>org.mybatis</groupId>
  <artifactId>mybatis</artifactId>
  <version>3.4.2</version>
 </dependency>


 <!-- mybatis引入spring適配包 -->
 <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis-spring -->
 <dependency>
  <groupId>org.mybatis</groupId>
  <artifactId>mybatis-spring</artifactId>
  <version>1.3.1</version>
 </dependency>


 <!-- 數(shù)據(jù)庫(kù)連接池 c3p0 -->
 <!-- https://mvnrepository.com/artifact/c3p0/c3p0 -->
 <dependency>
  <groupId>c3p0</groupId>
  <artifactId>c3p0</artifactId>
  <version>0.9.1.2</version>
 </dependency>


 <!-- mysql驅(qū)動(dòng) -->
 <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
 <dependency>
  <groupId>mysql</groupId>
  <artifactId>mysql-connector-java</artifactId>
  <version>8.0.13</version>
 </dependency>

 <!-- jstl標(biāo)簽相關(guān)的包 -->
 <!-- https://mvnrepository.com/artifact/jstl/jstl -->
 <dependency>
  <groupId>jstl</groupId>
  <artifactId>jstl</artifactId>
  <version>1.2</version>
 </dependency>


 <!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
 <dependency>
  <groupId>javax.servlet</groupId>
  <artifactId>javax.servlet-api</artifactId>
  <version>3.0.1</version>
  <scope>provided</scope>
 </dependency>


 <!-- 逆向工程jar包 -->
 <!-- https://mvnrepository.com/artifact/org.mybatis.generator/mybatis-generator-core -->
 <dependency>
  <groupId>org.mybatis.generator</groupId>
  <artifactId>mybatis-generator-core</artifactId>
  <version>1.3.5</version>
 </dependency>


 <!--分頁(yè)依賴的jar包-->
 <dependency>
  <groupId>com.github.pagehelper</groupId>
  <artifactId>pagehelper</artifactId>
  <version>5.0.0</version>
 </dependency>

 </dependencies>

 <build>
 <finalName>ssm3</finalName>
 <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
  <plugins>
  <plugin>
   <artifactId>maven-clean-plugin</artifactId>
   <version>3.1.0</version>
  </plugin>
  <!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
  <plugin>
   <artifactId>maven-resources-plugin</artifactId>
   <version>3.0.2</version>
  </plugin>
  <plugin>
   <artifactId>maven-compiler-plugin</artifactId>
   <version>3.8.0</version>
  </plugin>
  <plugin>
   <artifactId>maven-surefire-plugin</artifactId>
   <version>2.22.1</version>
  </plugin>
  <plugin>
   <artifactId>maven-war-plugin</artifactId>
   <version>3.2.2</version>
  </plugin>
  <plugin>
   <artifactId>maven-install-plugin</artifactId>
   <version>2.5.2</version>
  </plugin>
  <plugin>
   <artifactId>maven-deploy-plugin</artifactId>
   <version>2.8.2</version>
  </plugin>
  </plugins>
 </pluginManagement>
 </build>
</project>

文章題目:ssm框架如何使用IDEA搭建-創(chuàng)新互聯(lián)
網(wǎng)站鏈接:http://muchs.cn/article46/pdhhg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供域名注冊(cè)靜態(tài)網(wǎng)站、手機(jī)網(wǎng)站建設(shè)、Google、移動(dòng)網(wǎng)站建設(shè)、網(wǎng)站內(nèi)鏈

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

微信小程序開(kāi)發(fā)