Me n My Programming

If Only I Have TIme

ITSB Spring 105 – The Importance of @Autowired in code

When you’re using Spring MVC, there are certain keyword that you must have and should not forget when you’re coding. For instance, the @Autowired keyword. This will link your code to the database code. It will automatically wired it for you. What happen when you forget this magical phrase? You will get a Java null pointer exception error. Yes. You will be like me, spending three days debugging the code that has no syntax error nor logic error. This cleverly error would happen when you have tons of code to write and no automation for it.

Just remember to double check the keyword when you got an error that doesn’t seem to come from syntax error nor logic error. Cheers!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Information

This entry was posted on September 30, 2013 by in Uncategorized.
%d bloggers like this: