-
Notifications
You must be signed in to change notification settings - Fork 3
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
It is not possible to customize the extraction of the properties of a pojo that is represented as a model #324
Comments
Hi @marcuslange! Thank you for creating the ticket. I will look at the problem in detail and then give you feedback. :) |
@marcuslange You can expect to get this bug fixed this weekend! :) |
Hey @marcuslange, I just took a closer look at the problem. I haven't quite understood the behavior yet. But it looks like you just need to make sure that the library mentioned in the error message is part of the classpath. It doesn't seem to be necessary to explicitly configure the I have adapted the corresponding samples project here so that the data model there uses a property of type So can you please first check if your project has the library mentioned in the error message in the classpath? And can you please add the library to the classpath if not and check again how the project behaves? |
I just verified that the fat jar does contain the jsr310 jar. I did notice that I use the hateoas starter and that you are not. I changed that, and am still receiving the same error. this is my current deps set up:
|
I pulled the code and tested locally.
|
Hey @marcuslange I still do not completely understand the root of the problem. Using the starter mainly helps to ease which dependencies are part of your project. In this case it should not make a difference if the starter is used or not because the starter is not responsible for adding Jackson related dependencies to a project. But even if I still need to understand why my samples project is working without any code change but yours is not, I refactored the code so that is is now using an Means, you can add a You should be able to request the latest SNAPSHOT dependency from the SonaType Snapshots Repository. It would be really nice if you would let me know if this approach works for you! :) |
Hey @marcuslange I would like to ask if you already had the chance to check if the current SNAPSHOT is working fine for you. It would be really nice to hear from you! :) |
Hey @marcuslange do you have any feedback for me? |
Sorry to leave you hanging. We decided not to use siren. There an issue with the specification that HAL-Forms solved, so went that direction. |
Hi @marcuslange! Nice to hear from you! And no problem that you decided for another Hypermedia dialect! :) Out of curiosity: which issue could you solve with HAL-Forms but not with Siren? |
@ingogriebsch, it's the options element on a property to add additional details (like enum values) to a property. |
Done! |
Describe the bug
BeanUtils creates a new ObjectMapper in method extractProperties. Since this ObjectMapper is not configured with JavaTimeModule, it throws exceptions on Java 8 date/time classes.
java.lang.IllegalArgumentException: Java 8 date/time type
java.time.LocalDate
not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling (through reference chain: com.swacorp.cbna.poc.documentdb.adapter.primary.rest.resource.LineSolutionResource["startDate"])To Reproduce
Return an object that contains a property of LocalDate
Expected behavior
I would expect that this class would use the configured ObjectMapper.
Environment:
The text was updated successfully, but these errors were encountered: