Is it possible to use Spring annotation

Hello!

Is it possible to use annotations instead of configuring plugin via xml?
I'm interested in @Controller and @RequestMapping annotations.

I've tried this example with no luck.
I'm not Spring guru, so any help is appreciated :)

4 comments
Comment actions Permalink

Frankly, we never tried.
In theory it can work, but needs checking and might need extra support from our side. I'd stick with standard approach used in our plugins to be on the safe side for now.

0
Comment actions Permalink

Egor, thanks for answer!

I wish I could use REST in my plugin, but all searches and googling lead me to Annotation-based configurations.
I saw your REST plugin for Teamcity. You are using JAX-RS, aren't you? I would like to stick with standard Spring functionality and avoid external dependencies.

So, it wold be nice if standard Spring's functionality worked well in Teamcity environment.
Would you like me to raise an issue in your bugtracker?

0
Comment actions Permalink

> You are using JAX-RS, aren't you?

Right.

> I would like to stick with standard Spring functionality and avoid external dependencies.

You will still need to depend on TeamCity API, so I am not completely sure I understand what kind of dependency you try to avoid here.
Would be great to get the issue description in terms of why the current approach does not work for you...

0
Comment actions Permalink

Egor,
I've raised an issue http://youtrack.jetbrains.com/issue/TW-28311
About dependencies: yes, I do depend on Teamcity API, but I should not bundle it with my plugin, because it will be executed inTeamcity context.
I'm telling about external jars, which I have to put in my lib directory or add as maven dependency.
If Spring already has support for implementing some task, why would I want to get another tool?

Honestly, I'm finished with my plugin - I've managed without standard REST. But it would be great, if developers could use standard features in theirs plugins. Internet hold tonns of information, that everyone can use. And asking someone in IRC about Spring has more chances to be answered, then asking about Teamcity plugin developement.
Hope, you got my point.

0

Please sign in to leave a comment.