Idea + SpringBoot + MySQL + mybatis는 신속하게 프로젝트를 구축합니다.

사진을 봐, Ori가

여기에 사진 설명 삽입
여기에 사진 설명 삽입

여기에 사진 설명 삽입
여기에 사진 설명 삽입
프로젝트가 저장된 주소를 설정합니다. 주소를 직접 선택하는 것이 가장 좋습니다. 그렇지 않으면 이틀 내에 프로젝트가 어디에 있는지 알 수 없습니다.
여기에 사진 설명 삽입
여기에 사진 설명 삽입
데이터베이스에 연결
여기에 사진 설명 삽입
여기에 사진 설명 삽입

这是我的源码,请参考

spring.datasource.url=jdbc:mysql:///localhost:3306/ssm001?useUnicode=true&characterEncoding=utf-8
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
mybatis.mapper-locations=classpath:mapper/*.xml

처음 생성 된 경우 종속성을 다운로드하는 데 시간이 오래 걸릴 수 있습니다. 잠시만 기다려주세요. 창 하단에 진행률 표시 줄이로드되지 않을 때까지. 가능한 문제는 다음과 같습니다.

1. java 및 resources 폴더의 아이콘이 잘못됨
여기에 사진 설명 삽입
여기에 사진 설명 삽입
여기에 사진 설명 삽입
2. 파일 종속성 오류가보고 됨 다음 작업을 시도 할 수 있습니다. (진행하기 전에 창 하단의 진행률 표시 줄이 완료되었는지 확인하십시오)

2.1이 작업에 대한주의를 단계적으로, 2가로드 될 때까지 기다린 다음 3을 실행합니다.
여기에 사진 설명 삽입

2.2 2.1을 확인할 수없는 경우 pom.xml 파일이 빨간색인지 확인하고 빨간색이면 다운로드되지 않은 항목이있을 수 있습니다. 그래도 작동하지 않으면 pom.xml을 비교하여 무언가 잘못 생성되었는지 확인하십시오.

pom.xml文件内容如下


<?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.3.5.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.example</groupId>
    <artifactId>demo4</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>demo4</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>2.1.3</version>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>

추천

출처blog.csdn.net/MYNAMEL/article/details/109463815