Join the social network of Tech Nerds, increase skill rank, get work, manage projects...

Include Empty/Null Variable to Json while serialize with Gson Android

Are you using Gson for Serializing Json String from Java Bean/Model class? If yes then It may be useful for you. Gson ignore null/empty value while serialize Object to Json String. Like Gson gson = new Gson(); String jsonData =

Using context:component-scan to pick up @Configuration Classes

In Spring 3.0 using the tag context:component-scan in xml file, the entry of the class(or bean) defined under the scan tag is automatically created. The example to show use of context:component-scan tag is as below: Example:- JavaConfig.jav...

@Resource annotaion in Spring

@Resource annotation allows you to specify a name of the injected bean. @Resource annotation takes a 'name' attribute which will be treated as the bean name we want to inject in the class. In other words we can say, it follows by-name autowiring ...

How to exclude a bean from auto-wiring?

When configuring beans in configuration file, set the "autowire-candidate" attribute of the bean element in .xml file to false, by doing this the container will exclude that specific bean from auto-wiring. By using the below example we can eas...
Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: