English 中文(简体)
Globalconfigure Jackson property using Spring?
原标题:Globally configure Jackson properties using Spring?

i 正在使用Jackson,并想知道能否利用资源确定全球财产?

Example: In some places i need to do:

jsonMapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);

It would be nice that i can configure Jackson to do this global using spring resources.xml, any suggestion on how to do this?

最佳回答

您可以轻而易举地这样做,只是扩展了org.codehaus.ackson.map.ObjectMapper。 • 施工人员的所有财产(或你也可以接受地图); 然后,在需要时自动确定您自己的目标。

问题回答

不是从盒子中排出的——但也许有人会建立这种延伸,释放为Jackson模块?





相关问题
array dependency injection in spring?

is there a way to use dependency injection to inject all available implementations of a specific interface in spring? This is kind of the same thing as asked here for .NET. Though my aim is to use @...

Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Grails Packaging and Naming Conventions

Packaging Controllers, Services,etc. i.e. - com.company.controllers - com.company.services Is this a good practice or should be avoided by all means?? Another worth mentioning problem I encountered ...

How can I determine Objects in application context?

I am trying to write a portlet for Liferay (using Tomcat and Spring) and need to use a database via Persistence API/Hibernate. I am using some configuration XMLs (applicationContext.xml, etc.) and ...

How to prevent JPA from rolling back transaction?

Methods invoked: 1. Struts Action 2. Service class method (annotated by @Transactional) 3. Xfire webservice call Everything including struts (DelegatingActionProxy) and transactions is configured ...

热门标签