I want to write my tag (extends TagSupport
) in my spring framework. In my tag class, will use some service which should auto inject by spring. But I always get null, seems spring can't inject service instance in my tag class.
The code is like the following:
public class FetchTagNameTag extends TagSupport {
@Autowired
private TaskService taskService;
...
taskService
is always null.
How can I resolve this? Thanks.