一 需求分析与环境搭建
1.需求分析
2.环境搭建
1.2.1首先配置mysql环境
先查找一下mysql环境
[root@hadoop122 ~]# mysql --version
mysql Ver 14.14 Distrib 5.7.28, for Linux (x86_64) using EditLine wrapper
[root@hadoop122 ~]#
之后用navicat连接数据库,连上就可以了
1.2.2 配置maven环境
记得把这个maven安装的位置记住,配到电脑的环境变量里面去
D:\IntelliJ IDEA 2022.2\plugins\maven\lib\maven3\bin
C:\Users\20120>mvn -version
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: D:\IntelliJ IDEA 2022.2\plugins\maven\lib\maven3\bin\..
Java version: 1.8.0_152, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_152\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
把这个里面的setting.xml配置一下
再去配置这个mirrors
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
配置setting环境
配置Idea里面的JDK环境
创建下面的项目
lombok插件安装
将数据导入进去,760M数据,大概能导一分钟
配置Maven环境
二 打成War包,发到linux上
启动tomcat访问
[root@hadoop122 ~]# cd /usr/tomcat/apache-tomcat-7.0.68
[root@hadoop122 apache-tomcat-7.0.68]# cd bin
[root@hadoop122 bin]# ./startup.sh
Using CATALINA_BASE: /usr/tomcat/apache-tomcat-7.0.68
Using CATALINA_HOME: /usr/tomcat/apache-tomcat-7.0.68
Using CATALINA_TMPDIR: /usr/tomcat/apache-tomcat-7.0.68/temp
Using JRE_HOME: /usr/java/jdk1.8.0_261/
Using CLASSPATH: /usr/tomcat/apache-tomcat-7.0.68/bin/bootstrap.jar:/usr/tomcat/apache-tomcat-7.0.68/bin/tomcat-juli.jar
Tomcat started.