Spring 学习笔记《SSM + Maven项目搭建》
发布日期:2021-06-30 14:57:37
浏览次数:2
分类:技术文章
本文共 8089 字,大约阅读时间需要 26 分钟。
现在都用springboot了。这文章貌似也没啥意义了
按 Eclipse 向导先新建一个 Maven Web项目
【Ctrl + N】打开新建窗口
- 搜索栏里输入
maven
- 选择
Maven Project
- 然后
Next
- 再
Next
- 选择
maven-archetype-webapp
然后Next
- Group Id:域名反写
- Artifact Id:项目名称
- 点
Finish
完成创建
添加依赖设置
/ssm/pom.xml 直接复制过去就好了,Maven 会帮我们搞定。
4.0.0 com.jerry ssm war 0.0.1-SNAPSHOT ssm Maven Webapp http://maven.apache.org SSM-Jerry UTF-8 4.3.7.RELEASE 2.9.0 3.4.6 1.3.1 ${finalName} org.apache.maven.plugins maven-compiler-plugin org.apache.tomcat.maven tomcat7-maven-plugin 2.2 http://localhost:8080/manager/text tomcat7 admin admin true org.mybatis.generator mybatis-generator-maven-plugin 1.3.2 src/main/resources/generatorConfig.xml true true Generate MyBatis Artifacts generate org.mybatis.generator mybatis-generator-core 1.3.2 mysql mysql-connector-java 5.1.35 org.eclipse.m2e lifecycle-mapping 1.0.0 org.mybatis.generator mybatis-generator-maven-plugin [1.3.2,) generate com.fasterxml.jackson.core jackson-core ${jackson.version} com.fasterxml.jackson.core jackson-databind ${jackson.version} com.fasterxml.jackson.core jackson-annotations ${jackson.version} junit junit 4.11 test javax.mail 1.4.7 org.springframework spring-context-support ${spring.version} javax.servlet servlet-api 3.0-alpha-1 provided javax.servlet jstl 1.2 javax.servlet.jsp jsp-api 2.2.1-b03 provided ch.qos.logback logback-classic 1.2.3 ch.qos.logback logback-core 1.2.3 org.logback-extensions logback-ext-spring 0.1.4 commons-fileupload commons-fileupload 1.2.2 org.mybatis.generator mybatis-generator-core 1.3.2 mysql mysql-connector-java 5.1.35 com.alibaba druid 0.2.9 org.mybatis mybatis ${mybatis.version} org.mybatis mybatis-spring ${mybatis.spring.version} org.aspectj aspectjweaver 1.7.1 org.springframework spring-webmvc ${spring.version} org.springframework spring-core ${spring.version} org.springframework spring-context ${spring.version} org.springframework spring-jdbc ${spring.version} org.springframework spring-beans ${spring.version} org.springframework spring-web ${spring.version} org.springframework spring-expression ${spring.version} org.springframework spring-orm ${spring.version} org.springframework spring-test ${spring.version} javax.persistence persistence-api 1.0.2 org.hibernate hibernate-validator 5.3.6.Final
添加 Tomcat 运行时库到 【Java Build Path】
我的 TomCat 已经装好了,这是新建的项目还没有把 jar
包加进来。现在只有 JRE 和 Maven 的:
项目名 》Build Path 》Configure Build Path...
打开上面的窗口 如果你还没有创建 Tomcat 选择 Server Runtime
后可以根据向导创建。 现在 Tomcat 相关的 Jar 包也到位了。 更新 Maven 项目
如果上面的工作都完成了,项目还有红叉叉,【Alt + F5】
打开下面窗口,勾选你的项目,点击【OK】
转载地址:https://jerryjin.blog.csdn.net/article/details/86659207 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
网站不错 人气很旺了 加油
[***.192.178.218]2024年04月14日 01时53分40秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
Python字符编码详解
2019-05-01
python设置默认字符编码
2019-05-01
python 解析XML xml.dom
2019-05-01
python变量作用域
2019-05-01
工程实践中最常用的数据结构与算法
2019-05-01
内存对齐
2019-05-01
C-Free 5.0注册码
2019-05-01
进程与线程的区别
2019-05-01
关于Linux路由表的route命令
2019-05-01
RedHat Linux网络配置
2019-05-01
Linux下查看文件和文件夹大小
2019-05-01
Linux如何设置从命令行启动?
2019-05-01
如何使Linux支持中文字符
2019-05-01
失败的数据恢复经历
2019-05-01
Linux下如何退出图形界面?
2019-05-01
关于C语言中的结构体对齐
2019-05-01
数据恢复过程中需要注意的一些问题
2019-05-01
const int *p,const * int p,int const *p
2019-05-01
解析大端模式和小端模式
2019-05-01
C++ 使用delete删除指针后应该做的工作
2019-05-01