Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Method signature types for methods of javax.persistence.AttributeConverter no longer included in configuration. #1329

@christophstrobl

Description

@christophstrobl

spring-native: 0.11.0-SNAPSHOT

In the sample below, both MonetaryAmountAttributeConverter and MonetaryAmount are added to the configuration, but the more concrete return type org.javamoney.moneta.Money of convertToEntityAttribute(...) ist not.

@Converter(autoApply = true)
public class MonetaryAmountAttributeConverter implements AttributeConverter<MonetaryAmount, String> {

	@Override
	public String convertToDatabaseColumn(MonetaryAmount amount) {
		// ...
	}

	@Override
	public Money convertToEntityAttribute(String source) { // Money type not added to configuration

this leads to the following warn on startup

j.m.s.DefaultMonetaryAmountsSingletonSpi : Using Money as default amount type, because loading of configured org.javamoney.moneta.Money.defaults.amountType failed

java.lang.ClassNotFoundException: org.javamoney.moneta.Money
	at java.lang.Class.forName(DynamicHub.java:1433) ~[restbucks:na]
	at java.lang.Class.forName(DynamicHub.java:1408) ~[restbucks:na]
	at org.javamoney.moneta.spi.DefaultMonetaryAmountsSingletonSpi.loadDefaultAmountType(DefaultMonetaryAmountsSingletonSpi.java:66) ~[restbucks:1.4.2]
	at org.javamoney.moneta.spi.DefaultMonetaryAmountsSingletonSpi.<init>(DefaultMonetaryAmountsSingletonSpi.java:46) ~[restbucks:1.4.2]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[na:na]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions