According with Spring Data Docs Appendix D: Repository query return types, the only supported types are: void, primitives, Wrapper types, T, Iterator, Collection, List, Optional, Stream, Future, CompletableFuture, ListenableFuture, Slice, Page, GeoResult, GeoResults, GeoPage.
As you can see, for now, it's not supported. One of the ideas behind it I think that it's not a common sense of all databases yet.
Obviously, you can use this storing as Json, and create a converter for it:
@Column(name = "configuration", nullable = false)
@Convert(converter = PluginAnalyzerConfigConverter.class)
private PluginAnalyzerConfig configuration;
and:
public class PluginAnalyzerConfigConverter implements
AttributeConverter<PluginAnalyzerConfig, String> {
@Override public String convertToDatabaseColumn(PluginAnalyzerConfig config) {
Gson parser = new Gson();
return parser.toJson(config, PluginAnalyzerConfig.class);
}
@Override public PluginAnalyzerConfig convertToEntityAttribute(String source) {
Gson parser = new Gson();
return parser.fromJson(source, PluginAnalyzerConfig.class);
}
}
Obviously that without that approach, you will not make usage of Json in a nice way like MySQL is capable of. But I think that there's no problem if you create MySQL specialized queries to make use of it.