-
Dec 19th, 2010, 07:25 AM
#1
Spring annotations and inheritance
Hi
I have a question regarding the spring annotations scope. Answers may save me some experimenting time 
If I use for example @Service, @Controller or @PreAuthorize annotations on a class or a method that is inherited by another class, will that annotation apply to the subclass / overriding methods?
What about the other way around, if i use an annotation on a subclass or an overriding method, will it be applying to the superclass / method? (i expect not).
Yuval
-
Jan 14th, 2011, 07:30 AM
#2
hi, i have the same question and find no clear answer from the web. Hope somebody or spring team can declare that.
-
Feb 16th, 2011, 09:58 AM
#3
"me too"
class Foo {
@Transactional
public void doSomething()
{ ... }
}
class Bar extends Foo{...}
Is calling new Bar().doSomething() affected by the Transactional annotation in the super class??
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules