Skip to content

Commit

Permalink
fix build for java 21
Browse files Browse the repository at this point in the history
  • Loading branch information
wetted committed Oct 18, 2023
1 parent f23678b commit 362a4f5
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,3 @@ repositories {
mavenCentral()
}

configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(module("org.codehaus.groovy:groovy"))
.using(module("org.apache.groovy:groovy:4.0.15"))
}
}
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ projectUrl=https://micronaut.io
githubSlug=micronaut-projects/micronaut-spring
developers=Graeme Rocher


springbootapi=https://docs.spring.io/spring-boot/docs/current/api
springdataapi=https://docs.spring.io/spring-data/data-commons/docs/current/api/
micronautcache=https://micronaut-projects.github.io/micronaut-cache/latest/api/io/micronaut/cache/
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ servlet-api = "6.0.0"
micronaut = "4.1.9"
micronaut-docs = "2.0.0"
micronaut-test = "4.0.0"
groovy = "4.0.12"
groovy = "4.0.15"
spock = "2.3-groovy-4.0"
h2 = '2.2.224'
jakarta-annotation = '2.1.1'
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pluginManagement {
}

plugins {
id 'io.micronaut.build.shared.settings' version '6.5.7'
id 'io.micronaut.build.shared.settings' version '6.6.0'
}

rootProject.name = 'spring-parent'
Expand Down
6 changes: 0 additions & 6 deletions spring-context/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.gradle.internal.jvm.Jvm

plugins {
id 'io.micronaut.build.internal.spring-module'
}
Expand All @@ -22,8 +20,4 @@ dependencies {
because 'not defined in toml because it hit a bug with version catalogs'
}
testImplementation libs.h2database

if (!JavaVersion.current().isJava9Compatible()) {
testImplementation files(Jvm.current().toolsJar)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
package io.micronaut.spring.annotation.context

import io.micronaut.context.annotation.EachProperty
import io.micronaut.context.annotation.Requires
import io.micronaut.scheduling.executor.ExecutorConfiguration
import io.micronaut.spring.context.MicronautApplicationContext
import jakarta.inject.Named
import jakarta.inject.Singleton
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.beans.factory.annotation.Qualifier
import org.springframework.context.ApplicationContext
import spock.lang.Shared
import spock.lang.Specification
Expand All @@ -30,6 +30,7 @@ class QualifierSpec extends Specification {

@Shared
Map<String, Object> config = [
'spec.name':'QualifierSpec',
'foo.bar.one.name':'one',
'foo.bar.two.name':'two',
]
Expand Down Expand Up @@ -105,6 +106,7 @@ class QualifierSpec extends Specification {
ctx.close()
}

@Requires(property = 'spec.name', value = 'QualifierSpec')
@Singleton
static class FooService {
@Autowired
Expand All @@ -116,18 +118,21 @@ class QualifierSpec extends Specification {

}

@Requires(property = 'spec.name', value = 'QualifierSpec')
@Singleton
@Named("bar1")
static class Bar1 implements Foo {

}

@Requires(property = 'spec.name', value = 'QualifierSpec')
@Singleton
@Named("bar2")
static class Bar2 implements Foo {

}

@Requires(property = 'spec.name', value = 'QualifierSpec')
@EachProperty('foo.bar')
static class FooBarProperties {
String name
Expand Down

0 comments on commit 362a4f5

Please sign in to comment.