Anthony
Anthony

Reputation: 167

Spring 2.0 Annotations and ant

I have an old appfuse project, running Spring 2.0, and Java 1.6, and I'm trying to get Transaction annotation support (and other annotations) running.

But, when I add this to our class:

@Transactional
public class ... {
}

We get an ant compile issue, like:

[javac] symbol: class Transactional
[javac] @Transactional
[javac]  ^

How do I tell ant which Spring transactions it should be using?

Upvotes: 0

Views: 513

Answers (1)

JB Nizet
JB Nizet

Reputation: 691765

This looks like a simple import problem to me. Have you imported the class org.springframework.transaction.annotation.Transactional:

import org.springframework.transaction.annotation.Transactional

Annotations are classes which must be imported to be used (without using their fully qualified name), just as any other class.

Upvotes: 1

Related Questions