小编Moh*_*Amr的帖子

类是否有可能继承超类的注释

我正在使用Spring Framework事务注释进行事务管理,我有一个抽象类注释@Transactional,如下所示:

package org.tts.maqraa.service;

import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Set;

import javax.persistence.EntityManager;
import javax.persistence.EntityNotFoundException;
import javax.persistence.PersistenceContext;
import javax.persistence.PersistenceContextType;
import javax.persistence.Query;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Parts of this code have been copied from JARVANA site.
 * 
 * @author Younis alomoush
 * 
 */
@Transactional(propagation=Propagation.REQUIRED)
public abstract class AbstractMaqraaService implements MaqraaService {


    private Logger logger = LoggerFactory.getLogger(this.getClass());


    private int defaultMaxResults = DEFAULT_MAX_RESULTS;

    @PersistenceContext(type=PersistenceContextType.TRANSACTION)
    private EntityManager em;
    /**
     * The {@link EntityManager} which is …
Run Code Online (Sandbox Code Playgroud)

java inheritance annotations class

20
推荐指数
2
解决办法
2万
查看次数

标签 统计

annotations ×1

class ×1

inheritance ×1

java ×1