av一区二区在线观看_亚洲男人的天堂网站_日韩亚洲视频_在线成人免费_欧美日韩精品免费观看视频_久草视

您的位置:首頁技術(shù)文章
文章詳情頁

教你使用idea搭建ssm詳細(xì)教程(Spring+Spring Mvc+Mybatis)

瀏覽:9日期:2023-09-21 10:08:52
目錄一、創(chuàng)建maven項(xiàng)目二、配置tomcat三、添加web模塊四、添加工件五、為項(xiàng)目添加tomcat的jar包六、idea不會編譯src下的mapper.xml文件七、將Spring和Mybatis文件位置八、pom.xml一、創(chuàng)建maven項(xiàng)目

我使用的是漢化的idea

可以選擇原型,我這里沒有選擇

教你使用idea搭建ssm詳細(xì)教程(Spring+Spring Mvc+Mybatis)

輸入項(xiàng)目名稱,完成創(chuàng)建

教你使用idea搭建ssm詳細(xì)教程(Spring+Spring Mvc+Mybatis)

二、配置tomcat

選擇運(yùn)行編輯配置

教你使用idea搭建ssm詳細(xì)教程(Spring+Spring Mvc+Mybatis)

點(diǎn)加號找見tomcat,點(diǎn)擊確定

教你使用idea搭建ssm詳細(xì)教程(Spring+Spring Mvc+Mybatis)

三、添加web模塊

點(diǎn)擊文件進(jìn)入項(xiàng)目結(jié)構(gòu),選擇模塊

教你使用idea搭建ssm詳細(xì)教程(Spring+Spring Mvc+Mybatis)

點(diǎn)加號找見web,點(diǎn)擊確定

教你使用idea搭建ssm詳細(xì)教程(Spring+Spring Mvc+Mybatis)

四、添加工件

點(diǎn)擊加號添加,并將可用元素中的jar包,右擊,加入lib中

教你使用idea搭建ssm詳細(xì)教程(Spring+Spring Mvc+Mybatis)

五、為項(xiàng)目添加tomcat的jar包

選擇模塊,選擇項(xiàng)目名

教你使用idea搭建ssm詳細(xì)教程(Spring+Spring Mvc+Mybatis)

選擇web服務(wù)

教你使用idea搭建ssm詳細(xì)教程(Spring+Spring Mvc+Mybatis)

六、idea不會編譯src下的mapper.xml文件

讓idea編譯器不忽略src下的mapper.xml配置文件,自動會忽略,而sts不會在pom文件中加入以下代碼就好

<build><resources> <resource><directory>src/main/java</directory><includes> <include>**/*.xml</include></includes> </resource></resources> </build>七、將Spring和Mybatis文件位置

放在resources下

教你使用idea搭建ssm詳細(xì)教程(Spring+Spring Mvc+Mybatis)

八、pom.xml

<?xml version='1.0' encoding='UTF-8'?><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>Poject_Stu</artifactId> <version>1.0-SNAPSHOT</version> <properties><maven.compiler.source>8</maven.compiler.source><maven.compiler.target>8</maven.compiler.target> </properties> <!--讓idea編譯器不忽略src下的mapper.xml配置文件,自動會忽略,而sts不會--> <build><resources> <resource><directory>src/main/java</directory><includes> <include>**/*.xml</include></includes> </resource></resources> </build> <dependencies><!-- spring jar 包--><dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>4.3.18.RELEASE</version></dependency><dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>4.3.7.RELEASE</version></dependency><dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>4.3.7.RELEASE</version></dependency><!-- mysql 的驅(qū)動包--><dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.17</version></dependency><!--logback 日志包--><dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.2.3</version></dependency><!-- mybatis jar 包--><dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.5.2</version></dependency><!-- 數(shù)據(jù)庫連接池 alibaba 的 druid --><dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>1.2.3</version></dependency><!-- mybatis與spring整合的jar包--><dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>2.0.6</version></dependency><!--spring管理的 jdbc ,以及事務(wù)相關(guān)的--><dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>4.3.7.RELEASE</version></dependency><dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope></dependency><dependency> <groupId>javax.servlet.jsp.jstl</groupId> <artifactId>jstl-api</artifactId> <version>1.2</version> <exclusions><exclusion> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId></exclusion><exclusion> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId></exclusion> </exclusions></dependency><dependency> <groupId>org.glassfish.web</groupId> <artifactId>jstl-impl</artifactId> <version>1.2</version> <exclusions><exclusion> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId></exclusion><exclusion> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId></exclusion><exclusion> <groupId>javax.servlet.jsp.jstl</groupId> <artifactId>jstl-api</artifactId></exclusion> </exclusions></dependency> </dependencies></project>

到此這篇關(guān)于教你使用idea搭建ssm詳細(xì)教程(Spring+Spring Mvc+Mybatis)的文章就介紹到這了,更多相關(guān)idea搭建ssm內(nèi)容請搜索好吧啦網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持好吧啦網(wǎng)!

標(biāo)簽: Spring
相關(guān)文章:
主站蜘蛛池模板: 国产精品一区二区三区在线 | 亚洲欧美日韩在线一区二区 | 亚洲成人综合网站 | 亚洲精品一区二区 | 国产免费一区二区 | 欧美精品一区在线 | 狼人伊人影院 | 91中文在线观看 | 成年免费大片黄在线观看一级 | www.亚洲视频.com | 国产精品久久久久久久免费大片 | 男女午夜免费视频 | 中文字幕不卡在线观看 | 中文字幕人成乱码在线观看 | 精品国产一区久久 | 亚洲精品一区国语对白 | 日韩在线中文字幕 | 久久久久久av | 久久久久久成人 | 久久久久久久久久久久久9999 | 国产一级片精品 | 日本一区二区电影 | 国产精品无码永久免费888 | 久久久久91 | 亚洲欧美精品在线观看 | 欧美老妇交乱视频 | 欧美一级大片免费看 | 日本高清在线一区 | 久国产 | av大片 | 精品无码三级在线观看视频 | 夜夜爽99久久国产综合精品女不卡 | 欧美亚洲国产精品 | 国产精品美女久久久久久免费 | 日韩二区| 91亚洲精品国偷拍自产在线观看 | 黑人性hd | 国产精品成av人在线视午夜片 | 嫩草黄色影院 | 国产精品久久国产精品 | 看羞羞视频 |