刚学会使用Git,
从Github上克隆了一个图书管理系统,
却无从下手不知道怎么运行,
经过网上搜索最终成功运行了项目,
下面就来记录分享一下运行过程吧。
首先:
打开项目中的.md文件,
这是项目说明,里边有开发配置和运行配置。
第一步:mysql操作就没问题了,将项目中的sql文件导入运行即可。
第二步:按照教程下载配置maven环境
这里参照链接:
[https://www.cnblogs.com/javajetty/p/10051156.html]
配置成功后在命令行将路径切换到项目目录下
运行# mvn jetty:run
第三步:在浏览器中打开端口http://localhost:8080/
我这里出现错误,发现8080端口已经被之前的Tomcat占用。
所以要讲maven的默认端口修改。
这里参考链接:[https://blog.csdn.net/hw_hi/article/details/78553773?depth_1-utm_source=distribute.pc_relevant.none-task&utm_source=distribute.pc_relevant.none-task]
在maven 项目中
1、找到web 文件下的pom.xml 文件
2、修改pox.xml中的port 即可
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<path>/baunaa</path>
<server>localhost</server>
<uriEncoding>UTF-8</uriEncoding>
<port>8081</port>
<protocol>org.apache.coyote.http11.Http11NioProtocol</protocol>
</configuration>
</plugin>
————————————————
原文链接:https://blog.csdn.net/hw_hi/article/details/78553773
至此,浏览器打开http://localhost:8081/端口就能运行项目啦。