参考 IDEA运行Maven项目配置全过程(菜鸟专属)_idea配置maven_Hi梅的博客-CSDN博客
下载 IDEA
下载JDK 1.8
bash
https://pan.baidu.com/s/1lj2na9omGwhPrCKYNz1qSQ
提取码:izkj
点击exe一步步next
添加环境变量: JAVA_HOME 对于自己jdk的路径
添加系统变量PATH:%JAVA_HOME%
通过cmd命令输入java -version 查看是否成功:如果成功会显示jdk版本号
下载 apache下的Maven,tomcat

bash
# 添加本地maven仓库地址
<localRepository>C:\pan\app\apache-maven-3.9.4\conf\repository</localRepository>
# 添加阿里镜像,加快下载资源速度
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
# 添加JDK 1.8
<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
</profiles>

tomcat
bash
https://pan.baidu.com/s/1tgDIqOlMU1hGF8cFeQ-Gjg
提取码:jdr1

添加环境变量
然后在IDEA添加local tomcat,VM options 添加
bash
-Dfile.encoding=UTF-8
然后添加项目

编译项目
对接mysql、redis,全局搜索datasource和redis,修改成对应的IP,端口号,用户名,密码等信息

前端编译: 到含package.json的项目路径下执行以下命令

bash
# 前端 到含package.json路径下
npm install # 下载依赖
npm run dev # 运行项目

登录前端地址 http://localhost:8091
后端编译:点击IDEA绿色三角形启动application,启动tomcat
