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

Customize the Jackson2ObjectMapperBuilder instead of replacing it #3838

Merged
merged 3 commits into from
Jul 18, 2016

Conversation

cbornet
Copy link
Member

@cbornet cbornet commented Jul 13, 2016

also set INDENT_INPUT to true in dev profile

Fix #3830

.featuresToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
.findModulesViaServiceLoader(true)
.modulesToInstall(module);
public ObjectMapper myJacksonObjectMapper() {
Copy link
Member

Choose a reason for hiding this comment

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

Can you change the name to jacksonObjectMapper or customJacksonObjectMapper ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, yes !

@deepu105 deepu105 closed this Jul 14, 2016
@deepu105 deepu105 reopened this Jul 14, 2016
@atomfrede
Copy link
Member

Do you remove the old serializers for already created projects?

@cbornet
Copy link
Member Author

cbornet commented Jul 17, 2016

I only keep the serializer for ZonedDateTime.

@atomfrede
Copy link
Member

I mean the physical files in cleanup.js. I think we should remove the obsolete serializers in already generated projects (or not?)

@cbornet
Copy link
Member Author

cbornet commented Jul 17, 2016

Oh, yes ! Good point ! I'll add them !

*/
function cleanupOldServerFiles(generator, javaDir, testDir) {
if (generator.isJhipsterVersionLessThan('3.4.3')) {
generator.removeFile(javaDir + 'domain/util/JSR310DateTimeSerializer.java');
Copy link
Member Author

Choose a reason for hiding this comment

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

I think it would be better to use generator.fs.delete() but there is currently an issue (yeoman/generator#950) so we can see about that later.

@jdubois
Copy link
Member

jdubois commented Jul 18, 2016

Lots of deleted code, cool!

@jdubois jdubois merged commit 754937c into jhipster:master Jul 18, 2016
@cbornet cbornet deleted the jackson_config branch July 18, 2016 14:19
@jdubois jdubois modified the milestone: 3.5.0 Jul 20, 2016
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.

4 participants