三亩地 三亩地SAN MU DI · CODE DIARY
ARTICLE DETAIL

日记详情

真实记录编程学习的某一天,欢迎挑你感兴趣的翻一翻。

[Springboot+vue笔记一]安装前置+依赖

[Springboot+vue笔记一]安装前置+依赖

一、安装idea

二、安装mysql

https://www.mysql.com/cn/downloads/

三、安装mysql可视化工具navicat

四、安装JDK

五、安装maven

apache-maven-3.8.1.ziphttps://maven.apache.org/download.cgi

六、 配置springboot3

6.1 配置maven

6.2 解决警告

WARNING: A restricted method in java.lang.System has been called WARNING: java.lang.System::load has been called by com.intellij.rt.execution.application.AppMainV2 in an unnamed module WARNING: Use--enable-native-access=ALL-UNNAMED to avoid a warningforcallers in this module WARNING: Restricted methods will be blocked in a future release unless native access is enabled

idea中 Run-Edit Configurations.-ServerApplication-Modify options-Add VM options

--enable-native-access=ALL-UNNAMED

七、安装vue3

7.1 安装nodejsnode-v24.4.0-x64.msi

https://nodejs.org/zh-cn

*给当前node环境配置淘宝镜像,用来快速安装前端依赖文件 npm configsetregistry https://registry.npmmirror.com yarn configsetregistry https://registry.npmmirror.com/ npm install yarn install*脚本限制解决 1.查看当前执行策略 首先,查看当前 PowerShell 会话的执行策略。Get-ExecutionPolicy如果显示 Restricted,说明脚本执行被限制。 2.设置执行策略为 RemoteSigned 将执行策略设置为 RemoteSigned,允许本地脚本运行。Set-ExecutionPolicy-Scope CurrentUser RemoteSigned 系统会提示你确认更改,输入 Y 并按回车键。 3.验证更改 再次查看执行策略,确保已更改为 RemoteSigned。Get-ExecutionPolicy如果显示 RemoteSigned,说明设置成功。

7.2 安装nvm(便捷安装多个nodejs环境)

nvm use 版本号 nvm uninstall 具体版本 nvm list

7.3 安装vue目录

Vue官网

npm create vue@latest yarn yarn dev

八、依赖

1.后端依赖

8.1springboot核心
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter</artifactId></dependency>
8.2springboot核心web

在spring中集成Tomcat(网络访问功能)

<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency>
8.3mysql连接
<dependency><groupId>com.mysql</groupId><artifactId>mysql-connector-j</artifactId></dependency>
8.4mybatis-plus(CRUD)
<dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-spring-boot3-starter</artifactId><version>3.5.9</version></dependency>

8.5 mybatis-plus分页

<dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-jsqlparser</artifactId><version>3.5.9</version></dependency>

8.6 lombok

<dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><version>1.18.38</version></dependency>

2.前端依赖

"dependencies": { "sass": "^1.102.0", //前端样式增强器 "vue": "^3.5.40", //核心 "vue-router": "^5.2.0" //路由 "element-plus": "^2.14.4", //element-plus组件 "axios": "^1.19.0", //前端向后端发送请求器 },
← 返回列表