Java Maven依赖SpringBoot和MySQL

Java Maven依赖SpringBoot和MySQL,java,mysql,spring,maven,spring-boot,Java,Mysql,Spring,Maven,Spring Boot,我们有带有SpringREST控制器的web应用程序。我们在Spring Boot 1.5.8上运行。我们需要添加MySQL数据库连接器和所有必需的依赖项。下面是我们当前的pom.xml。我们尝试了许多选择,但没有成功。我们已经尝试在mvndependencies.com上添加依赖项。以及完成项目并从中复制依赖项 <parent> <groupId>org.springframework.boot</groupId> <artifactI

我们有带有SpringREST控制器的web应用程序。我们在Spring Boot 1.5.8上运行。我们需要添加MySQL数据库连接器和所有必需的依赖项。下面是我们当前的pom.xml。我们尝试了许多选择,但没有成功。我们已经尝试在mvndependencies.com上添加依赖项。以及完成项目并从中复制依赖项

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.8.RELEASE</version>
    <relativePath /> <!-- lookup parent from repository -->
</parent>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-cache</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-websocket</artifactId>
    </dependency>

    <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-configuration-processor</artifactId>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>com.nimbusds</groupId>
        <artifactId>nimbus-jose-jwt</artifactId>
        <version>5.1</version>
    </dependency>
    <dependency>
        <groupId>com.github.scribejava</groupId>
        <artifactId>scribejava-apis</artifactId>
        <version>4.2.0</version>
    </dependency>

</dependencies>

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

如果您想使用所需的spring引导数据,请提前感谢

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
如果要添加MySql支持,唯一需要的依赖项是MySql驱动程序:

<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
</dependency>

两个依赖项版本都应该由管理。

您到底面临什么问题?有错误信息吗?