泽西岛问题第1.18节 [英] Jersey Question v 1.18
本文介绍了泽西岛问题第1.18节的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
只是想问一下我用Jersey框架制作的课程都是线程安全的吗?意味着所有@path方法都是线程安全的?
我的意思是说例如我将通过客户端的ajax调用方法,仍然是方法是procsafe?感谢你的答案。
BTW,我使用的是Jersey 1.18:下面是我的代码。
Hi All,
Just wanted to ask are classes I made with Jersey framework are all threadsafe? meaning all of the @path methods are threadsafe?
I mean say for example I'll be calling the methods through ajax from the client side, will still be the methods be treadsafe? Appreciate your answers.
BTW, I am using Jersey 1.18 : below is my code.
package com.jax.rs.project.status;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
@Path("/v1/status")
public class V1_status {
@POST
@Produces(MediaType.TEXT_HTML)
public String returnTitle() {
return "java services";
}
@Path("/v1")
@GET
@Produces(MediaType.TEXT_HTML)
public String returnTitle2() {
return "java services 2";
}
}
推荐答案
你应该在 https://jersey.java.net/ [ ^ ]。
这篇关于泽西岛问题第1.18节的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文