Skip to content

Commit

Permalink
Update dependency com.sun.xml.bind:jaxb-impl to v2.3.8 (#12858)
Browse files Browse the repository at this point in the history
* Update projectVersion to 6.0.0-SNAPSHOT

* Update GrailsUtilTests.java

* Update groovy-joint-workflow.yml

* Update to minimum Java 11 (#12783)

* Update Micronaut monorepo (#12800)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Support Environments Concept in Micronaut Context (#12809)

* Support Environments Concept in Micronaut Context

Implemented a new MicronautYamlPropertySourceLoader which reads environment specific properties from application.yml file based on the current configured environment.

Fixes #12082

* Update GroovyConfigPropertySourceLoaderSpec.groovy

* Use Java 11 for Release (#12812)

Update Release Workflow YAML file to use Java 11 for the build.

* Release v6.0.0-M1

* Back to 6.0.0-SNAPSHOT

* Merge branch 5.3.x (#12908)

* Update dependabot.yml

* Update aspectjVersion to v1.9.19 (#12822)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Fix typo in Readme (#12838)

* Update Micronaut monorepo (#12806)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Bump grails-datastore-gorm-hibernate5 from 7.3.0 to 7.3.1 (#12824)

Bumps [grails-datastore-gorm-hibernate5](https://github.com/grails/gorm-hibernate5) from 7.3.0 to 7.3.1.
- [Release notes](https://github.com/grails/gorm-hibernate5/releases)
- [Commits](grails/gorm-hibernate5@v7.3.0...v7.3.1)

---
updated-dependencies:
- dependency-name: org.grails:grails-datastore-gorm-hibernate5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update spring boot to v2.7.8 (#12823)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update plugin com.gradle.enterprise to v3.12.2 (#12813)

* Update plugin com.gradle.enterprise to v3.12.2

* Remove explicit test-rety plugin

Gradle Enterprise 3.12.2 implicity includes the test-retry plugin

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Puneet Behl <behlp@objectcomputing.com>

* Update apache-tomcat monorepo to v9.0.71 (#12842)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update apache-maven-resolver monorepo to v1.9.4 (#12841)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update apache-ant monorepo to v1.10.13 (#12830)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update Micronaut Spring monorepo to v4.5.0 (#12846)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update spring core to v5.3.25 (#12845)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update junit5 monorepo (#12844)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency net.java.dev.jna:jna to v5.13.0 (#12847)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update release-drafter/release-drafter action to v5.22.0 (#12849)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency io.methvin:directory-watcher to v0.17.3 (#12856)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update plugin com.gradle.enterprise to v3.12.3 (#12853)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update Micronaut monorepo to v3.8.3 (#12852)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update Grails Profile BOM (#12857)

Update grails angular profile to 8.0.2

* Release v5.3.0

* Back to 5.3.1-SNAPSHOT

* Fix for Groovy STC and SC issues (#12851)

* `@CompileStatic` property access

* `@CompileStatic` property access

* `@CompileStatic` collection element type

* Update Micronaut monorepo to v3.8.4 (#12862)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update datastoreVersion to v7.3.3 (#12861)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency org.apache.maven:maven-resolver-provider to v3.9.0 (#12843)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency io.methvin:directory-watcher to v0.18.0 (#12866)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update Grails Gradle Plugin to 5.2.5 (#12865)

* Update dependency com.netflix.nebula:gradle-extra-configurations-plugin to v9 (#12818)

* Update dependency com.netflix.nebula:gradle-extra-configurations-plugin to v9

* Update nebula.optional-base plugin id

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Puneet Behl <behlp@objectcomputing.com>

* Update alpine Docker tag to v20230208 (#12864)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update Vue profile to 5.0.3 (#12867)

* Update from Micronaut 3.5.4 to 3.5.7 (#12871)

* Update Grails Gradle Plugin to 5.2.6 (#12872)

* Release v5.2.6

* Back to 5.2.7-SNAPSHOT

* Update dependency commons-fileupload:commons-fileupload to v1.5 (#12869)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Dependency cleanup (#12868)

Remove dependency to tomcat-embed-logging-log4j from grails-plugin-datasource
Issue #11631 (#11631)

* Update Grails Gradle Plugin to 5.3.0 (#12873)

* Release v5.3.1

* Back to 5.3.2-SNAPSHOT

* Revert "Update dependency org.apache.maven:maven-resolver-provider to v3.9.0 (#12843)"

This reverts commit 9fdfad5.

* Release v5.3.2

* Back to 5.3.3-SNAPSHOT

* Update Micronaut monorepo to v3.8.5 (#12876)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency io.github.gradle-nexus:publish-plugin to v1.2.0 (#12881)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update release-drafter/release-drafter action to v5.23.0 (#12880)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency org.jsoup:jsoup to v1.15.4 (#12878)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update gspVersion to v5.2.2 (#12877)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency gradle to v6.9.4 (#12882)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update apache-tomcat monorepo to v9.0.72 (#12884)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update spring boot to v2.7.9 (#12885)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update apache-maven-resolver monorepo to v1.9.5 (#12883)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mattias Reichel <mattias.reichel@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eric Milles <eric.milles@thomsonreuters.com>
Co-authored-by: ivo-k <ikurbjuhn@lstelcom.com>

* Update dependency com.sun.xml.bind:jaxb-impl to v2.3.8

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Puneet Behl <behlp@objectcomputing.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mattias Reichel <mattias.reichel@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eric Milles <eric.milles@thomsonreuters.com>
Co-authored-by: ivo-k <ikurbjuhn@lstelcom.com>
  • Loading branch information
6 people committed Mar 13, 2023
1 parent 8efd8cc commit 3a1d6d1
Show file tree
Hide file tree
Showing 20 changed files with 378 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['8', '11', '14']
java: ['11', '14']
env:
WORKSPACE: ${{ github.workspace }}
GRADLE_OPTS: -Xmx1500m -Dfile.encoding=UTF-8
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/groovy-joint-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ jobs:
run: env

# Select correct Groovy branch for this build:
- name: Checkout Groovy 3_0_X (Grails 5)
- name: Checkout Groovy 3_0_X (Grails 5 and later)
run: cd .. && git clone --depth 1 https://github.com/apache/groovy.git -b GROOVY_3_0_X --single-branch
if: github.ref == 'refs/heads/5.3.x' || github.base_ref == '5.3.x' || github.ref == 'refs/heads/5.2.x' || github.base_ref == '5.2.x' || github.ref == 'refs/heads/5.1.x' || github.base_ref == '5.1.x' || github.ref == 'refs/heads/5.0.x' || github.base_ref == '5.0.x' || github.ref == 'refs/heads/master' || github.base_ref == 'master'
- name: Checkout Groovy 2_5_X (Grails 4)
if: github.ref == 'refs/heads/6.0.x' || github.base_ref == '6.0.x' || github.ref == 'refs/heads/5.3.x' || github.base_ref == '5.3.x' || github.ref == 'refs/heads/5.2.x' || github.base_ref == '5.2.x' || github.ref == 'refs/heads/5.1.x' || github.base_ref == '5.1.x' || github.ref == 'refs/heads/5.0.x' || github.base_ref == '5.0.x' || github.ref == 'refs/heads/master' || github.base_ref == 'master'
- name: Checkout Groovy 2_5_X (Grails 4.0.x)
run: cd .. && git clone --depth 1 https://github.com/grails/grails-core.git -b GROOVY_2_5_X --single-branch
if: github.ref == 'refs/heads/4.1.x' || github.base_ref == '4.1.x' || github.ref == 'refs/heads/4.0.x' || github.base_ref == '4.0.x'
- name: Set CI_GROOVY_VERSION for Grails
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['8']
java: ['11']
env:
GIT_USER_NAME: puneetbehl
GIT_USER_EMAIL: behlp@objectcomputing.com
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,8 @@ subprojects { project ->
if(project.name == 'grails-dependencies') return
if(project.name == 'grails-bom') return

sourceCompatibility = "1.8"
targetCompatibility = "1.8"
sourceCompatibility = "1.11"
targetCompatibility = "1.11"

if(project.name =~ /^(grails-web|grails-plugin-|grails-test-suite|grails-test)/) {
dependencies {
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
projectVersion=5.3.3-SNAPSHOT
projectVersion=6.0.0-SNAPSHOT
antVersion=1.10.13
aspectjVersion=1.9.19
asyncVersion=4.0.0
Expand All @@ -20,7 +20,7 @@ jakartaAnnotationApiVersion=2.0.0
jansiVersion=1.18
javaParserCoreVersion=3.15.14
javaxAnnotationApiVersion=1.3.2
jaxbVersion=2.3.1
jaxbVersion=2.3.8
jlineVersion=2.14.6
jnaVersion=5.13.0
junitVersion=4.13.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class MainClassFinder {
boolean found = false

MainMethodFinder() {
super(Opcodes.ASM4)
super(Opcodes.ASM7)
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private static void initializeState() {
final ClassReader classReader = new ClassReader(inputStream);
final String astTransformerClassName = AstTransformer.class.getSimpleName();
final ClassLoader finalClassLoader = classLoader;
classReader.accept(new ClassVisitor(Opcodes.ASM4) {
classReader.accept(new ClassVisitor(Opcodes.ASM7) {
@Override
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
try {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Copyright 2017-2020 original authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.grails.core.cfg

import groovy.transform.Internal
import io.micronaut.context.env.yaml.ConstructIsoTimestampString
import org.yaml.snakeyaml.constructor.SafeConstructor
import org.yaml.snakeyaml.nodes.MappingNode
import org.yaml.snakeyaml.nodes.SequenceNode
import org.yaml.snakeyaml.nodes.Tag

/**
* Yaml constructor to create containers with sensible
* default array bounds.
*
* @author James Kleeh
* @since 6.0.0
*/
@Internal
class CustomSafeConstructor extends SafeConstructor {
CustomSafeConstructor() {
yamlConstructors.put(Tag.TIMESTAMP, new ConstructIsoTimestampString())
}

@Override
protected Map<Object, Object> newMap(MappingNode node) {
return createDefaultMap(node.getValue().size())
}

@Override
protected List<Object> newList(SequenceNode node) {
return createDefaultList(node.getValue().size())
}
}

Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package org.grails.core.cfg

import grails.plugins.GrailsPlugin
import grails.util.BuildSettings
import grails.util.Environment
import grails.util.Metadata
import groovy.transform.CompileStatic
import io.micronaut.context.env.AbstractPropertySourceLoader
import io.micronaut.context.env.MapPropertySource
import io.micronaut.context.exceptions.ConfigurationException
import io.micronaut.core.io.ResourceLoader
import org.grails.config.NavigableMap
Expand All @@ -22,7 +24,7 @@ class MicronautGroovyPropertySourceLoader extends AbstractPropertySourceLoader {

@Override
int getOrder() {
return DEFAULT_POSITION
return DEFAULT_POSITION + 1
}

@Override
Expand All @@ -37,9 +39,10 @@ class MicronautGroovyPropertySourceLoader extends AbstractPropertySourceLoader {
appVersion: Metadata.getCurrent().getApplicationVersion())
try {
def configObject = configSlurper.parse(input.getText("UTF-8"))
def propertySource = new NavigableMap()
final Map<String, Object> propertySource = new NavigableMap()
propertySource.merge(configObject.flatten(), false)
finalMap.putAll(propertySource)
processEnvironmentSpecificProperties(finalMap, propertySource)
} catch (Throwable e) {
throw new ConfigurationException("Exception occurred reading configuration [" + name + "]: " + e.getMessage(), e)
}
Expand Down Expand Up @@ -68,4 +71,19 @@ class MicronautGroovyPropertySourceLoader extends AbstractPropertySourceLoader {
return Collections.singleton("groovy")
}

@Override
protected MapPropertySource createPropertySource(String name, Map<String, Object> map, int order) {
return super.createPropertySource("grails.$name", map, order)
}

void processEnvironmentSpecificProperties(finalMap, Map<String, Object> propertySource) {
final String environmentName = Environment.current.name
if (environmentName != null) {
final String environmentPrefix = GrailsPlugin.ENVIRONMENTS + '.' + environmentName + '.'
propertySource.keySet().stream()
.filter(k -> k.startsWith(environmentPrefix))
.forEach(propertyName -> { finalMap[propertyName.substring(environmentPrefix.length())] = propertySource.get(propertyName) })
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package org.grails.core.cfg

import grails.plugins.GrailsPlugin
import grails.util.Environment
import groovy.transform.CompileStatic
import io.micronaut.context.env.MapPropertySource
import io.micronaut.context.env.yaml.YamlPropertySourceLoader

/**
* Load properties from a YAML file. This class extends the Micronaut default implementation {@link io.micronaut.context.env.yaml.YamlPropertySourceLoader} where it adds support for Micronaut beans receive configuration from environments block.
*
* @author Puneet Behl
* @since 6.0.0
*/
@CompileStatic
class MicronautYamlPropertySourceLoader extends YamlPropertySourceLoader {

@Override
int getOrder() {
return super.getOrder() + 1
}

@Override
protected MapPropertySource createPropertySource(String name, Map<String, Object> map, int order) {
return super.createPropertySource("grails.$name", map, order)
}

/**
* Only process environment specific entries as the other entries are already processed by Micronaut default {@link io.micronaut.context.env.yaml.YamlPropertySourceLoader}
*
* @param finalMap The map with all the properties processed
* @param map The map to process
* @param prefix The prefix for the keys
*/
@Override
protected void processMap(Map<String, Object> finalMap, Map map, String prefix) {
final String env = Environment.current.name
if (env != null) {
final String grailsEnvironmentPrefix = GrailsPlugin.ENVIRONMENTS + '.' + env + '.'
((Map<String, Object>) map).entrySet().stream()
.filter(e -> e.key instanceof String && (((String) e.key).startsWith(GrailsPlugin.ENVIRONMENTS) || prefix.startsWith(GrailsPlugin.ENVIRONMENTS)))
.forEach(e -> {
Map.Entry entry = (Map.Entry) e
String key = entry.getKey().toString()
Object value = entry.getValue()
if (value instanceof Map && !((Map) value).isEmpty()) {
processMap(finalMap, (Map) value, prefix + key + '.')
} else if ((prefix + key).startsWith(grailsEnvironmentPrefix)) {
finalMap.put((prefix + key).substring(grailsEnvironmentPrefix.length()), value)
}
})
}
}
}
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
org.grails.core.cfg.MicronautYamlPropertySourceLoader
org.grails.core.cfg.MicronautGroovyPropertySourceLoader
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class GrailsUtilTests {

@Test
public void testGrailsVersion() {
assertEquals("5.3.3-SNAPSHOT", GrailsUtil.getGrailsVersion());
assertEquals("6.0.0-SNAPSHOT", GrailsUtil.getGrailsVersion());
}

@AfterEach
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package org.grails.core.cfg

import grails.util.Environment

trait EnvironmentAwareSpec {

Environment previous = null

void setEnvironment(Environment environment) {
if (System.hasProperty(Environment.KEY)) {
previous = Environment.getEnvironment(System.getProperty(Environment.KEY))
}
System.setProperty(Environment.KEY, environment ? environment.getName() : '')
}

void resetEnvironment() {
if (previous) {
System.setProperty(Environment.KEY, previous.getName())
} else {
System.setProperty(Environment.KEY, '')
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.grails.core.cfg

import grails.util.Environment
import org.grails.config.PropertySourcesConfig
import org.springframework.core.env.MutablePropertySources
import org.springframework.core.env.PropertySources
Expand All @@ -8,7 +9,11 @@ import org.springframework.core.io.Resource
import spock.lang.Specification

@SuppressWarnings("GrMethodMayBeStatic")
class GroovyConfigPropertySourceLoaderSpec extends Specification {
class GroovyConfigPropertySourceLoaderSpec extends Specification implements EnvironmentAwareSpec {

void setup() {
resetEnvironment()
}

void "test loading multiple configuration files"() {
setup:
Expand All @@ -17,6 +22,7 @@ class GroovyConfigPropertySourceLoaderSpec extends Specification {

GroovyConfigPropertySourceLoader groovyPropertySourceLoader = new GroovyConfigPropertySourceLoader()
Map<String, Object> finalMap = [:]
environment = Environment.TEST

when:
PropertySources propertySources = new MutablePropertySources()
Expand All @@ -25,8 +31,9 @@ class GroovyConfigPropertySourceLoaderSpec extends Specification {
def config = new PropertySourcesConfig(propertySources)

then:
config.size() == 7
config.size() == 9
config.getProperty("my.local.var", String.class) == "test"
config.getProperty("foo.bar", String.class) == "test"
config.getProperty("userHomeVar", String.class)

}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package org.grails.core.cfg

import grails.util.Environment
import grails.util.SupplierUtil
import io.micronaut.context.ApplicationContext
import io.micronaut.context.ApplicationContextBuilder
import io.micronaut.context.ApplicationContextConfigurer
import io.micronaut.context.annotation.ContextConfigurer
import io.micronaut.context.env.PropertySource
import io.micronaut.spring.context.factory.MicronautBeanFactoryConfiguration
import org.springframework.core.convert.ConversionService
import org.springframework.core.env.ConfigurableEnvironment
import org.springframework.core.env.PropertyResolver
import org.springframework.lang.NonNull

import java.util.function.Supplier

trait MicronautContextAwareSpec {

ApplicationContext micronautContext
String[] environments = new String[5]
Supplier<ClassLoader> classLoader = SupplierUtil.memoized(() -> this.getClass().getClassLoader())

ApplicationContextBuilder micronautContextBuilder() {
if (Environment.current != null) {
environments[0] = Environment.current.getName()
}
final ApplicationContextBuilder builder = ApplicationContext.builder()
.classLoader(classLoader.get())
.deduceEnvironment(false)
.propertySources(PropertySource.of("grails-config", [(MicronautBeanFactoryConfiguration.PREFIX + ".bean-excludes"): (Object) beanExcludes]))
.environments(environments)

builder
}

ApplicationContext getMicronautContext() {
if (micronautContext == null) {
micronautContext = micronautContextBuilder().build()
}
micronautContext
}

ApplicationContext start() {
if (micronautContext != null) {
micronautContext.start()
}
}

List<Class<?>> getBeanExcludes() {
List beanExcludes = []
beanExcludes.add(ConversionService.class)
beanExcludes.add(org.springframework.core.env.Environment.class)
beanExcludes.add(PropertyResolver.class)
beanExcludes.add(ConfigurableEnvironment.class)
def objectMapper = io.micronaut.core.reflect.ClassUtils.forName("com.fasterxml.jackson.databind.ObjectMapper", classLoader.get()).orElse(null)
if (objectMapper != null) {
beanExcludes.add(objectMapper)
}
beanExcludes
}

void setClassLoader(ClassLoader classLoader) {
this.classLoader = SupplierUtil.memoized(() -> classLoader)
}

}
Loading

0 comments on commit 3a1d6d1

Please sign in to comment.