Skip to content
Advertisement

Aspect Logging: no match for this type name, what am I doing wrong?

Here is my Logging class

JavaScript

Here is the exception I have

JavaScript

Here is the structure I have. I have my controller classes under this dir, why is there no match? Controller Structure

I do appreciate your help a lot!

Advertisement

Answer

You have some basically language type error

JavaScript

check this and the other within(@...) that you have

You should use @ when you want to mean for classes that bring the following annotation. For example you would use within(@org.springframework.stereotype.Repository *) and you would mean classes that have the annotation @Repository from Spring.

In your case you intend to mean the package. Then the correct way of doing that is within(com.topjava.graduation.restaurant.*)

So in the end you must correct it to

JavaScript
Advertisement