国产成人精品久久免费动漫-国产成人精品天堂-国产成人精品区在线观看-国产成人精品日本-a级毛片无码免费真人-a级毛片毛片免费观看久潮喷

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

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

瀏覽:6日期: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)文章:
主站蜘蛛池模板: 亚洲久草视频 | 大伊香蕉精品视频在线天堂 | 国产精品区牛牛影院 | 18年大片免费在线 | 日韩在线成人 | 国产精品自拍一区 | 成人伊人 | 久久久精品久久视频只有精品 | 欧美18www| 国产一区二区免费播放 | 成人一级免费视频 | 亚洲精品国产拍拍拍拍拍 | 中文字幕一区二区三区精品 | 一本色道久久88亚洲综合 | 步兵网站| 亚洲爱爱天堂 | 好湿好紧好痛a级是免费视频 | 久久久99精品免费观看精品 | 国产亚洲一区在线 | 国产美女作爱视频 | 亚洲精品国产一区二区三 | 日本免费毛片在线高清看 | 波多野结衣一区在线观看 | 国产50页| 亚洲人成网站在线观看播放 | 国产亚洲精品久久久久久午夜 | 国产一级一片免费播放i | 亚洲天堂二区 | 日本九六视频 | 国产精品久久精品视 | 亚洲人成在线精品 | 中文字幕日韩一区二区不卡 | 亚洲精品色一区二区三区 | 欧美日本一区亚洲欧美一区 | 亚洲成人在线视频 | 国产精品视频久久 | 国产成人在线小视频 | 荡女妇边被c边呻吟久久 | 美国三级网站 | 亚洲国产精品自在现线让你爽 | 国产精品不卡在线 |