Tag Archives: java

Aspect trace logging in Java (Spring Framework)

An easy way to enable tracing of methods and parameter values in Java Spring is by using AspectJ. A simplified example of my Aspect class to make tracing easy, without any ‘logger.trace’ code in the classes itself: package com.markvandenbergh.test.util; import … Continue reading

Posted in Coding, General, Java, Spring | Tagged , , , , , | Leave a comment

Autowiring Spring bean in IntelliJ

Having one of the following errors in IntelliJ? Could not autowire. No beans of ‘yourType’ type found or Could not autowire. There is more than one bean of ‘yourType’ type. If you’re sure you have your Spring bean definitions correct … Continue reading

Posted in Coding, IntelliJ, Java, Spring | Tagged , , , , | 1 Comment

Fast debugging statements

While reading Code Complete 2nd Edition I ran into a chapter which covers defensive programming. Defensive programming includes debugging, but not to any price of course. We don’t want performance of the application to suffer from debugging statements, at least … Continue reading

Posted in Coding, General | Tagged , , , , , , , | Leave a comment