将 org.apache.cxf.jaxrs.swagger.Swagger2Feature 升级到用户 jakarta

问题描述 投票:0回答:1

我正在将旧的 java 服务升级到 java 17,我注意到它在版本 3.6.4 中使用 org.apache.cxf.jaxrs.swagger.Swagger2Feature。问题是 Swagger2Feature 类使用 javax:

import javax.servlet.ServletContext;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerRequestFilter;
import javax.ws.rs.container.PreMatching;
import javax.ws.rs.core.Application;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
import org.apache.cxf.Bus;
import org.apache.cxf.annotations.Provider;
import org.apache.cxf.annotations.Provider.Scope;
import org.apache.cxf.annotations.Provider.Type;
import org.apache.cxf.common.util.PropertyUtils;
import org.apache.cxf.endpoint.Server;
import org.apache.cxf.jaxrs.JAXRSServiceFactoryBean;
import org.apache.cxf.jaxrs.common.openapi.DefaultApplicationFactory;
import org.apache.cxf.jaxrs.common.openapi.DelegatingServletConfig;
import org.apache.cxf.jaxrs.common.openapi.SwaggerProperties;
import org.apache.cxf.jaxrs.common.openapi.SyntheticServletConfig;
import org.apache.cxf.jaxrs.ext.ContextProvider;
import org.apache.cxf.jaxrs.ext.MessageContext;
import org.apache.cxf.jaxrs.model.ApplicationInfo;
import org.apache.cxf.jaxrs.model.ClassResourceInfo;
import org.apache.cxf.jaxrs.provider.ServerProviderFactory;
import org.apache.cxf.jaxrs.swagger.ui.SwaggerUiConfig;
import org.apache.cxf.jaxrs.swagger.ui.SwaggerUiSupport;
import org.apache.cxf.jaxrs.utils.InjectionUtils;
import org.apache.cxf.message.Message;

@Provider(
    value = Type.Feature,
    scope = Scope.Server
)
public class Swagger2Feature extends AbstractSwaggerFeature<Portable> implements SwaggerUiSupport, SwaggerProperties {

有替代或升级吗?我一直在谷歌搜索但找不到与此等效的内容 https://mvnrepository.com/artifact/org.apache.cxf/cxf-rt-rs-service-description-swagger

但对于雅加达。

swagger cxf upgrade java-17
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.