Spring 2.0的注解和蚂蚁 [英] Spring 2.0 Annotations and ant

查看:288
本文介绍了Spring 2.0的注解和蚂蚁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个旧的appfuse项目,跑泉2.0和Java 1.6,我试图让交易注解支持(和其他注释)运行。

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]  ^

我如何告诉Ant它应该使用Spring的事务吗?

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

推荐答案

这看起来像一个简单的导入问题给我。你有没有导入的类 org.springframework.transaction.annotation.Transactional

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.

这篇关于Spring 2.0的注解和蚂蚁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆