I am using Spring Boot 2.17 and java sdk and dynamodb-enhanced '2.13.8'.
I am calling with the enhanced client an item like this:
public Product readProductById(String id) {
Key key = Key.builder()
.partitionValue(id)
.build();
Product product = productTable.getItem(key);
return product;
}
it leads when called to this error:
class de.xxx.productsapi.db.Product cannot be cast to class de.xxx.productsapi.db.Product (de.xxx.productsapi.db.Product is in unnamed module of loader 'app'; de.xxx.productsapi.db.Product is in unnamed module of loader org.springframework.boot.devtools.restart.classloader.RestartClassLoader @19e19c7e)
java.lang.ClassCastException: class de.xxx.productsapi.db.Product cannot be cast to class de.xxx.productsapi.db.Product (de.xxx.productsapi.db.Product is in unnamed module of loader 'app'; de.xxx.productsapi.db.Product is in unnamed module of loader org.springframework.boot.devtools.restart.classloader.RestartClassLoader @19e19c7e)
Switching the livereload to enabled: false did not help but completly removing the devtools worked. But this a not statisfying solution since I want to use the devtools.
Thanks for help