Skip to content
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

Build fix, update and cleanup dependencies #60

Merged
merged 4 commits into from
May 11, 2020
Merged

Conversation

stokito
Copy link
Contributor

@stokito stokito commented Apr 10, 2020

Maven central recently switched to HTTPS so we need to make some changes to fix a build.
Also newer JDKs was released so here is some update of Spring Boot and core dependencies

Use https for repos. Gradle already have a macros for mavenCentral() and it's the same as repo.maven.apache.org/maven2.
The repo1.maven.org/maven2/ is deprecated and in fact the same mavenCentral()
Java 8 already have built-in date types
Use Jackson ObjectMapper instead

private String toJson(Object object) {
try {
ObjectMapper objectMapper = new ObjectMapper();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spring provides an object mapper by default so we can autowire one into the constructor and utilise it here.

private String toJson(Object object) {
try {
ObjectMapper objectMapper = new ObjectMapper();
String json = objectMapper.writeValueAsString(object);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, this can be autowired in from Spring

@robevansuk robevansuk merged commit 656aae4 into irufus:master May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants