Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

peer dependencies 1.0.8 #86

Closed
kopax opened this issue Jan 16, 2017 · 4 comments
Closed

peer dependencies 1.0.8 #86

kopax opened this issue Jan 16, 2017 · 4 comments
Assignees
Labels
Milestone

Comments

@kopax
Copy link

kopax commented Jan 16, 2017

I have tried to clone the latest version of spring-data-mybatis on branch master

My application failed with this error :

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
Application failed to start due to an exception
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'java.lang.Class<org.springframework.data.repository.Repository<?, ?>>' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

I have upgraded in my build.gradle :

compile("org.mybatis.spring.boot:mybatis-spring-boot-starter:1.2.0")
compile("org.mybatis:mybatis:3.4.2")
compile("org.mybatis:mybatis-spring:1.3.1")

I manage to do a working build with these dependencies using this commit

What version are you exactly compatible with in next release ?

I have encoutered some trouble (#85) with @Projection annotation. This is why I am trying to upgrade.

@kopax kopax changed the title Bump versions peer dependencies 1.0.8 Jan 16, 2017
@easybest easybest self-assigned this Feb 1, 2017
@easybest easybest added the bug label Feb 1, 2017
@easybest easybest added this to the 1.0.8 milestone Feb 1, 2017
@kopax
Copy link
Author

kopax commented Feb 2, 2017

By the way, the spring team release a new version : https://spring.io/blog/2017/01/26/spring-data-release-train-ingalls-goes-ga

I've created git test repository with branches for each cases #87#85, #88.

I am trying to follow up the testing but it was after 1.0.7 where no version were tagged.

I had to use gradle instead of maven because of the required local maven repository which is not convenient for providing test case. (Gradle allow us to simply import all jar from a directory)

It would be nice if you could release a new version to facilitate testing including the new spring-data.

@easybest
Copy link
Owner

easybest commented Feb 2, 2017

just need:

    compile("com.ifrabbit:spring-boot-starter-data-mybatis:{version}")

@easybest
Copy link
Owner

easybest commented Feb 2, 2017

now you can use:


    compile("com.ifrabbit:spring-boot-starter-data-mybatis:1.0.8.BUILD-SNAPSHOT")

before 1.0.8 is released

@easybest easybest closed this as completed Feb 2, 2017
@easybest
Copy link
Owner

easybest commented Feb 2, 2017

this was modified your build.gradle, and it can be run successfully:

buildscript {
    repositories {
        mavenCentral()
        maven { url "http://repo.spring.io/plugins-release" }
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.1.RELEASE")
// end::build[]
        classpath("org.springframework.build.gradle:propdeps-plugin:0.0.7")
    }

}

apply plugin: "java"
//apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "org.springframework.boot"
apply plugin: "propdeps"
apply plugin: "propdeps-maven"
apply plugin: "propdeps-idea"
apply plugin: "propdeps-eclipse"

// This is used as the docker image prefix (org)
group = "org.springframework.data.mybatis.samples"

jar {
    baseName = "spring-data-mybatis-testing"
    version = "0.1.0"
}

repositories {
    mavenCentral()
    maven { url "http://repo.spring.io/plugins-release" }
    maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
    // Import local jars
    compile fileTree(dir: 'libs', include: ['*.jar'])
//    compile("com.ifrabbit:spring-data-mybatis:1.0.7.RELEASE")
    compile("org.apache.commons:commons-lang3:3.4")
    compile("org.apache.directory.server:apacheds-server-jndi:1.5.5")
    compile("com.h2database:h2:1.4.193")
    compile("com.ifrabbit:spring-boot-starter-data-mybatis:1.0.8.BUILD-SNAPSHOT")
//    compile("org.mybatis.spring.boot:mybatis-spring-boot-starter:1.2.0")
//    compile("org.mybatis:mybatis:3.4.2")
//    compile("org.mybatis:mybatis-spring:1.3.1")
    compile("org.mybatis:mybatis-typehandlers-jsr310:1.0.1")
    compile("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.8.5")
    compile("org.springframework.boot:spring-boot-starter-data-rest")
    compile("org.flywaydb:flyway-core")
    // Starter for testing Spring Boot applications with libraries including JUnit, Hamcrest and Mockito
    testCompile("org.springframework.boot:spring-boot-starter-test")
}

// ensure that resources are processed before code is compiled.
// Without this directive any additional-spring-configuration-metadata.json files will not be processed.
compileJava.dependsOn(processResources)

// Wrapper configuration
task wrapper(type: Wrapper) {
    gradleVersion = "3.3"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants