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

Allow core deserializers to be used in bootstrap context #359

Merged
merged 1 commit into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class BootstrapContextSpec extends Specification {

@Override
Publisher<PropertySource> getPropertySources(Environment environment) {
return Publishers.just(PropertySource.of(['bootstrap-deser': mapper.readValue('{"foo":"bar"}', Argument.of(MyBean))]))
return Publishers.just(PropertySource.of(['bootstrap-deser': mapper.readValue('{"foo":"bar", "strings":["one", "two"]}', Argument.of(MyBean))]))
}

@Override
Expand All @@ -60,5 +60,6 @@ class BootstrapContextSpec extends Specification {
@Serdeable
static class MyBean {
String foo
List<String> strings
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package io.micronaut.serde.support.deserializers;

import io.micronaut.context.annotation.BootstrapContextCompatible;
import io.micronaut.context.annotation.Factory;
import io.micronaut.core.annotation.NonNull;
import io.micronaut.core.annotation.Order;
Expand Down Expand Up @@ -46,6 +47,7 @@
* Core deserializers.
*/
@Factory
@BootstrapContextCompatible
public class CoreDeserializers {

/**
Expand Down