我正在尝试将我们的旧码头应用程序迁移到Spring Boot应用程序中,其中码头将用于嵌入式服务器。
在Spring Boot中是否可以配置以下代码?
ServletHolder applicationHolder = new ServletHolder(new ServletContainer());
applicationHolder.setInitParameter(org.glassfish.jersey.server.ServerProperties.PROVIDER_PACKAGES, packages);
applicationHolder.setInitOrder(0);
ServletContextHandler contextHandler = new ServletContextHandler(options);
contextHandler.setContextPath(contextPath);
contextHandler.addServlet(applicationHolder, "/*");