Q1)Please let me what has gone wrong in beans.xml?. I am getting error as "org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'id' is defined " when i run the program.
Well, Main.java:13 tries to get a bean named "id", and there isn't one. I suspect you meant "name", which is also not terribly clear.
Also, when posting code/stacktraces/etc. please make sure to wrap very long lines, otherwise we have to scroll to the right quite far in order read your post, edit our post, etc.
So there appears to be something wrong in your AOP configuration. Either your pointcut is incorrect, or you are using a named pointcut and the Advice is trying to
point to the name, and it is an incorrect name.