弹簧靴无法启动

时间:2018-10-16 13:27:37

标签: spring-boot c3p0

我正在将旧的应用程序移植到Spring Boot,但无法以以下消息启动

public class MockHttpServerTest {

    private static final int PORT = 51234;
    private static final String baseUrl = "http://localhost:" + PORT;
    private MockHttpServer server;
    private SimpleHttpResponseProvider responseProvider;
    private HttpClient client;

    @Before
    public void setUp() throws Exception {
        responseProvider = new SimpleHttpResponseProvider();
        server = new MockHttpServer(PORT, responseProvider);
        server.start();
        client = new DefaultHttpClient();
    }

这是我的pom.xml

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call the method org.hibernate.c3p0.internal.C3P0MessageLogger.connectionProperties(Ljava/util/Properties;)V but it does not exist. Its class, org.hibernate.c3p0.internal.C3P0MessageLogger, is available from the following locations:

    jar:file:/Users/simoncigoj/.m2/repository/org/hibernate/hibernate-c3p0/4.3.11.Final/hibernate-c3p0-4.3.11.Final.jar!/org/hibernate/c3p0/internal/C3P0MessageLogger.class

It was loaded from the following location:

    file:/Users/simoncigoj/.m2/repository/org/hibernate/hibernate-c3p0/4.3.11.Final/hibernate-c3p0-4.3.11.Final.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of org.hibernate.c3p0.internal.C3P0MessageLogger

http://maven.apache.org/xsd/maven-4.0.0.xsd“>     4.0.0

<?xml version="1.0" encoding="UTF-8"?>

和我的主要春季班

<groupId>com.goopti</groupId>
<artifactId>services-boot</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>services-boot</name>
<description>Demo project for Spring Boot</description>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.5.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-web</artifactId>
    </dependency>

    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger2</artifactId>
        <version>2.9.2</version>
    </dependency>

    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger-ui</artifactId>
        <version>2.9.2</version>
    </dependency>


    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
        <version>RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-entitymanager</artifactId>
        <version>4.3.11.Final</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-c3p0</artifactId>
        <version>4.3.11.Final</version>
    </dependency>
    <!-- Abelium-GoOpti -->
    <dependency>
        <groupId>com.abelium.goopti</groupId>
        <artifactId>goopti-db-model</artifactId>
        <version>0.4.0-SNAPSHOT</version>
    </dependency>
</dependencies>

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

0 个答案:

没有答案