Experiment migration to JSR-310#1
Open
daus-salar wants to merge 5 commits intotechdev-solutions:masterfrom
Open
Experiment migration to JSR-310#1daus-salar wants to merge 5 commits intotechdev-solutions:masterfrom
daus-salar wants to merge 5 commits intotechdev-solutions:masterfrom
Conversation
* modified .gitignore * added eclipse gradle plugins
so at least all tests pass
|
Hi Lars, this is awesome! When we decided to open-source trackr we hoped that it will be of good use to others who chose a similar stack. So we are really happy to see your enhancements. Currently we slowed down development but will pick it up again soon. So please keep us in the loop and let us know if we can be of any help or if you want to share your experiences! Cheers, |
Contributor
|
Thanks Lars, this is great! I will test it out with our frontend and look forward to merge it. The constant conversions between As Alex said, if you have any further questions please contact us! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hallo Moritz,
my company http://www.carneios.de had also the idea to create a time tracking app like trackr.
After some evaluation we considered a very similar tech stack, but did not start development yet. Also we currently evaluate to use trackr or patch it to our needs, we had created some prototypes.
During this creation of prototypes, we solved some problems using jsr310(java date time api).
In this branch I want to show you our solution by migrating trackr to jsr310. Although I can't test it with the front end since I haven't tried to start an oauth service up to now, all unit tests succeed.
Here a summary of the changes
package de.techdev.trackr.domain.converter;. With theautoApplyoption you even get rid of any special annotations on date-time fields.** Date fields annotated with
@Temporal(DATE)are converted to fields of typeLocalDate** Date fields annotated with
@Temporal(TIME)are converted to fields of typeLocalTime** Date fields annotated with
@Temporal(TIMESTAMP)are converted to fields of typeInstantTimePropertiesToJsonDateConverter. At this point I am not sure whether there is no time ("hh:mm") http parameter in your application, since I haven't write one but all tests pass.Possible breakage with frontend:
new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");to write the test data to the backend. Unfortunately this isn't compatible with theDateTimeFormatter.ISO_INSTANTsince the utc sign 'Z' is missing. I don't think this is really a problem but you should know this.At the end I conclude it is not difficult to and definitely not impossible to use jsr 310 with jpa and spring. But I can agree that a little bit more support by Hibernate and Spring is desirable.
Regards Lars