添加MySQL配置,并跑通项目
This commit is contained in:
		
							
								
								
									
										1
									
								
								backend/.idea/encodings.xml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										1
									
								
								backend/.idea/encodings.xml
									
									
									
										generated
									
									
									
								
							@@ -2,6 +2,7 @@
 | 
				
			|||||||
<project version="4">
 | 
					<project version="4">
 | 
				
			||||||
  <component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8">
 | 
					  <component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8">
 | 
				
			||||||
    <file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
 | 
					    <file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
 | 
				
			||||||
 | 
					    <file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
 | 
				
			||||||
    <file url="PROJECT" charset="UTF-8" />
 | 
					    <file url="PROJECT" charset="UTF-8" />
 | 
				
			||||||
  </component>
 | 
					  </component>
 | 
				
			||||||
</project>
 | 
					</project>
 | 
				
			||||||
							
								
								
									
										1
									
								
								backend/.idea/misc.xml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										1
									
								
								backend/.idea/misc.xml
									
									
									
										generated
									
									
									
								
							@@ -1,6 +1,5 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
<project version="4">
 | 
					<project version="4">
 | 
				
			||||||
  <component name="ExternalStorageConfigurationManager" enabled="true" />
 | 
					 | 
				
			||||||
  <component name="MavenProjectsManager">
 | 
					  <component name="MavenProjectsManager">
 | 
				
			||||||
    <option name="originalFiles">
 | 
					    <option name="originalFiles">
 | 
				
			||||||
      <list>
 | 
					      <list>
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										
											BIN
										
									
								
								backend/.mvn/wrapper/maven-wrapper.jar
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								backend/.mvn/wrapper/maven-wrapper.jar
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -1,10 +0,0 @@
 | 
				
			|||||||
<component name="ProjectRunConfigurationManager">
 | 
					 | 
				
			||||||
  <configuration default="false" name="Application" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
 | 
					 | 
				
			||||||
    <option name="ACTIVE_PROFILES" />
 | 
					 | 
				
			||||||
    <module name="entrance" />
 | 
					 | 
				
			||||||
    <option name="SPRING_BOOT_MAIN_CLASS" value="com.cxyxiaomo.entrance.Application" />
 | 
					 | 
				
			||||||
    <method v="2">
 | 
					 | 
				
			||||||
      <option name="Make" enabled="true" />
 | 
					 | 
				
			||||||
    </method>
 | 
					 | 
				
			||||||
  </configuration>
 | 
					 | 
				
			||||||
</component>
 | 
					 | 
				
			||||||
							
								
								
									
										154
									
								
								backend/pom.xml
									
									
									
									
									
								
							
							
						
						
									
										154
									
								
								backend/pom.xml
									
									
									
									
									
								
							@@ -1,63 +1,111 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					<?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"
 | 
					<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">
 | 
					         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>
 | 
					    <modelVersion>4.0.0</modelVersion>
 | 
				
			||||||
	<parent>
 | 
					    <parent>
 | 
				
			||||||
		<groupId>org.springframework.boot</groupId>
 | 
					        <groupId>org.springframework.boot</groupId>
 | 
				
			||||||
		<artifactId>spring-boot-starter-parent</artifactId>
 | 
					        <artifactId>spring-boot-starter-parent</artifactId>
 | 
				
			||||||
		<version>2.7.4</version>
 | 
					        <version>2.7.4</version>
 | 
				
			||||||
		<relativePath/> <!-- lookup parent from repository -->
 | 
					        <relativePath/> <!-- lookup parent from repository -->
 | 
				
			||||||
	</parent>
 | 
					    </parent>
 | 
				
			||||||
	<groupId>com.cxyxiaomo</groupId>
 | 
					    <groupId>com.cxyxiaomo</groupId>
 | 
				
			||||||
	<artifactId>entrance</artifactId>
 | 
					    <artifactId>entrance</artifactId>
 | 
				
			||||||
	<version>0.0.1-SNAPSHOT</version>
 | 
					    <version>0.0.1-SNAPSHOT</version>
 | 
				
			||||||
	<name>Epidemic prevention platform</name>
 | 
					    <name>Epidemic prevention platform</name>
 | 
				
			||||||
	<description></description>
 | 
					    <description>Epidemic prevention platform</description>
 | 
				
			||||||
	<properties>
 | 
					    <properties>
 | 
				
			||||||
		<java.version>11</java.version>
 | 
					        <java.version>11</java.version>
 | 
				
			||||||
	</properties>
 | 
					    </properties>
 | 
				
			||||||
	<dependencies>
 | 
					    <dependencies>
 | 
				
			||||||
		<!-- spring -->
 | 
					        <!-- Spring -->
 | 
				
			||||||
 | 
					        <!-- spring-boot-starter -->
 | 
				
			||||||
		<dependency>
 | 
							<dependency>
 | 
				
			||||||
			<groupId>org.springframework.boot</groupId>
 | 
								<groupId>org.springframework.boot</groupId>
 | 
				
			||||||
			<artifactId>spring-boot-starter-test</artifactId>
 | 
								<artifactId>spring-boot-starter-test</artifactId>
 | 
				
			||||||
 | 
					            <version>2.7.4</version>
 | 
				
			||||||
			<scope>test</scope>
 | 
								<scope>test</scope>
 | 
				
			||||||
		</dependency>
 | 
							</dependency>
 | 
				
			||||||
		<!-- mybatis -->
 | 
					        <dependency>
 | 
				
			||||||
		<dependency>
 | 
					            <groupId>org.springframework.boot</groupId>
 | 
				
			||||||
			<groupId>org.mybatis.spring.boot</groupId>
 | 
					            <artifactId>spring-boot-starter-data-jdbc</artifactId>
 | 
				
			||||||
			<artifactId>mybatis-spring-boot-starter</artifactId>
 | 
					            <version>2.7.4</version>
 | 
				
			||||||
			<version>2.2.2</version>
 | 
					        </dependency>
 | 
				
			||||||
		</dependency>
 | 
					 | 
				
			||||||
		<!-- mysql -->
 | 
					 | 
				
			||||||
		<dependency>
 | 
					 | 
				
			||||||
			<groupId>mysql</groupId>
 | 
					 | 
				
			||||||
			<artifactId>mysql-connector-java</artifactId>
 | 
					 | 
				
			||||||
			<scope>runtime</scope>
 | 
					 | 
				
			||||||
		</dependency>
 | 
					 | 
				
			||||||
		<!-- lombok -->
 | 
					 | 
				
			||||||
		<dependency>
 | 
					 | 
				
			||||||
			<groupId>org.projectlombok</groupId>
 | 
					 | 
				
			||||||
			<artifactId>lombok</artifactId>
 | 
					 | 
				
			||||||
			<optional>true</optional>
 | 
					 | 
				
			||||||
		</dependency>
 | 
					 | 
				
			||||||
	</dependencies>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<build>
 | 
					
 | 
				
			||||||
		<plugins>
 | 
					        <!-- Database -->
 | 
				
			||||||
			<plugin>
 | 
							<!-- mybatis -->
 | 
				
			||||||
				<groupId>org.springframework.boot</groupId>
 | 
					        <dependency>
 | 
				
			||||||
				<artifactId>spring-boot-maven-plugin</artifactId>
 | 
					            <groupId>org.mybatis.spring.boot</groupId>
 | 
				
			||||||
				<configuration>
 | 
					            <artifactId>mybatis-spring-boot-starter</artifactId>
 | 
				
			||||||
					<excludes>
 | 
					            <version>2.2.2</version>
 | 
				
			||||||
						<exclude>
 | 
					        </dependency>
 | 
				
			||||||
							<groupId>org.projectlombok</groupId>
 | 
							<!-- mysql -->
 | 
				
			||||||
							<artifactId>lombok</artifactId>
 | 
					        <dependency>
 | 
				
			||||||
						</exclude>
 | 
					            <groupId>mysql</groupId>
 | 
				
			||||||
					</excludes>
 | 
					            <artifactId>mysql-connector-java</artifactId>
 | 
				
			||||||
				</configuration>
 | 
					            <scope>runtime</scope>
 | 
				
			||||||
			</plugin>
 | 
					        </dependency>
 | 
				
			||||||
		</plugins>
 | 
					
 | 
				
			||||||
	</build>
 | 
					        <!-- Others -->
 | 
				
			||||||
 | 
							<!-- lombok -->
 | 
				
			||||||
 | 
					        <dependency>
 | 
				
			||||||
 | 
					            <groupId>org.projectlombok</groupId>
 | 
				
			||||||
 | 
					            <artifactId>lombok</artifactId>
 | 
				
			||||||
 | 
					            <optional>true</optional>
 | 
				
			||||||
 | 
					        </dependency>
 | 
				
			||||||
 | 
					    </dependencies>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <build>
 | 
				
			||||||
 | 
					        <plugins>
 | 
				
			||||||
 | 
					            <plugin>
 | 
				
			||||||
 | 
					                <groupId>org.springframework.boot</groupId>
 | 
				
			||||||
 | 
					                <artifactId>spring-boot-maven-plugin</artifactId>
 | 
				
			||||||
 | 
					                <configuration>
 | 
				
			||||||
 | 
					                    <excludes>
 | 
				
			||||||
 | 
					                        <exclude>
 | 
				
			||||||
 | 
					                            <groupId>org.projectlombok</groupId>
 | 
				
			||||||
 | 
					                            <artifactId>lombok</artifactId>
 | 
				
			||||||
 | 
					                        </exclude>
 | 
				
			||||||
 | 
					                    </excludes>
 | 
				
			||||||
 | 
					                </configuration>
 | 
				
			||||||
 | 
					            </plugin>
 | 
				
			||||||
 | 
					        </plugins>
 | 
				
			||||||
 | 
					    </build>
 | 
				
			||||||
 | 
					    <repositories>
 | 
				
			||||||
 | 
					        <repository>
 | 
				
			||||||
 | 
					            <id>spring-milestones</id>
 | 
				
			||||||
 | 
					            <name>Spring Milestones</name>
 | 
				
			||||||
 | 
					            <url>https://repo.spring.io/milestone</url>
 | 
				
			||||||
 | 
					            <snapshots>
 | 
				
			||||||
 | 
					                <enabled>false</enabled>
 | 
				
			||||||
 | 
					            </snapshots>
 | 
				
			||||||
 | 
					        </repository>
 | 
				
			||||||
 | 
					        <repository>
 | 
				
			||||||
 | 
					            <id>spring-snapshots</id>
 | 
				
			||||||
 | 
					            <name>Spring Snapshots</name>
 | 
				
			||||||
 | 
					            <url>https://repo.spring.io/snapshot</url>
 | 
				
			||||||
 | 
					            <releases>
 | 
				
			||||||
 | 
					                <enabled>false</enabled>
 | 
				
			||||||
 | 
					            </releases>
 | 
				
			||||||
 | 
					        </repository>
 | 
				
			||||||
 | 
					    </repositories>
 | 
				
			||||||
 | 
					    <pluginRepositories>
 | 
				
			||||||
 | 
					        <pluginRepository>
 | 
				
			||||||
 | 
					            <id>spring-milestones</id>
 | 
				
			||||||
 | 
					            <name>Spring Milestones</name>
 | 
				
			||||||
 | 
					            <url>https://repo.spring.io/milestone</url>
 | 
				
			||||||
 | 
					            <snapshots>
 | 
				
			||||||
 | 
					                <enabled>false</enabled>
 | 
				
			||||||
 | 
					            </snapshots>
 | 
				
			||||||
 | 
					        </pluginRepository>
 | 
				
			||||||
 | 
					        <pluginRepository>
 | 
				
			||||||
 | 
					            <id>spring-snapshots</id>
 | 
				
			||||||
 | 
					            <name>Spring Snapshots</name>
 | 
				
			||||||
 | 
					            <url>https://repo.spring.io/snapshot</url>
 | 
				
			||||||
 | 
					            <releases>
 | 
				
			||||||
 | 
					                <enabled>false</enabled>
 | 
				
			||||||
 | 
					            </releases>
 | 
				
			||||||
 | 
					        </pluginRepository>
 | 
				
			||||||
 | 
					    </pluginRepositories>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</project>
 | 
					</project>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,8 +6,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
 | 
				
			|||||||
@SpringBootApplication
 | 
					@SpringBootApplication
 | 
				
			||||||
public class Application {
 | 
					public class Application {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	public static void main(String[] args) {
 | 
					    public static void main(String[] args) {
 | 
				
			||||||
		SpringApplication.run(Application.class, args);
 | 
					        SpringApplication.run(Application.class, args);
 | 
				
			||||||
	}
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1 +1,5 @@
 | 
				
			|||||||
 | 
					# MySQL配置
 | 
				
			||||||
 | 
					spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
 | 
				
			||||||
 | 
					spring.datasource.url=jdbc:mysql://127.0.0.1:3306/epp?useUnicode=true&characterEncoding=utf8&useSSL=false
 | 
				
			||||||
 | 
					spring.datasource.username=root
 | 
				
			||||||
 | 
					spring.datasource.password=root
 | 
				
			||||||
@@ -6,8 +6,8 @@ import org.springframework.boot.test.context.SpringBootTest;
 | 
				
			|||||||
@SpringBootTest
 | 
					@SpringBootTest
 | 
				
			||||||
class ApplicationTests {
 | 
					class ApplicationTests {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	@Test
 | 
					    @Test
 | 
				
			||||||
	void contextLoads() {
 | 
					    void contextLoads() {
 | 
				
			||||||
	}
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										20
									
								
								database/epp.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								database/epp.sql
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 Navicat Premium Data Transfer
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 Source Server         : localhost MySQL 8.0
 | 
				
			||||||
 | 
					 Source Server Type    : MySQL
 | 
				
			||||||
 | 
					 Source Server Version : 80012
 | 
				
			||||||
 | 
					 Source Host           : localhost:3306
 | 
				
			||||||
 | 
					 Source Schema         : epp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 Target Server Type    : MySQL
 | 
				
			||||||
 | 
					 Target Server Version : 80012
 | 
				
			||||||
 | 
					 File Encoding         : 65001
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 Date: 21/10/2022 01:13:14
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SET NAMES utf8mb4;
 | 
				
			||||||
 | 
					SET FOREIGN_KEY_CHECKS = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SET FOREIGN_KEY_CHECKS = 1;
 | 
				
			||||||
		Reference in New Issue
	
	Block a user