添加Web套接字支持弹簧数据休息事件

时间:2015-07-22 11:52:46

标签: websocket spring-data-rest

我有弹簧数据休息库,默认发布,更新和删除。 我还实现了一个事件处理程序,现在如何将Web套接字添加到事件处理程序中?

@RepositoryEventHandler(User.class)
@Service
public class UserEventHandler {
    private static final Logger LOG =    LoggerFactory.getLogger(UserEventHandler.class);

   @Autowired
   private SmtpMailSender smtpMailSender;

   @HandleAfterCreate
   public void handleBeforeCreate(User u) {
   }

}

// Repository class
@Transactional
@RepositoryRestResource(path = "users", collectionResourceRel = "users")
public interface UserRepository extends PagingAndSortingRepository<User, String> {

}

0 个答案:

没有答案