1.配置环境
1.springboot 下载jdk1.8,以及配置国内镜像,使用alibaba的maven导入进去。
2.配置pom文件。参考代码
注意jdk1.8对应的spring-boot-starter-parent的版本应该是2.x.x.这里引入了mybatis-plus依赖文章来源地址https://www.toymoban.com/news/detail-852920.html
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.8</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>demo8</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>demo8</name>
<description>demo8</description>
<properties>
<java.version>8</java.version>
<!-- 数据库驱动 -->
<mysql-connector.version>8.0.26</mysql-connector.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.22</version>
<
文章来源:https://www.toymoban.com/news/detail-852920.html
到了这里,关于springboot和vue3简单连接交互的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!