@Override public void run(String... args) throws Exception { SwaggerConfig config = ConfigFactory.config(); config.setBasePath("http://localhost:8080/"); config.setApiVersion("1.0.0"); ScannerFactory.setScanner(new DefaultJaxrsScanner()); ClassReaders.setReader(new JerseyApiReader()); }
public void onApplicationEvent(EmbeddedServletContainerInitializedEvent event) { // Swagger SwaggerConfig config = ConfigFactory.config(); config.setBasePath("/api"); config.setApiVersion(env.getProperty("info.build.version")); ScannerFactory.setScanner(new DefaultJaxrsScanner()); ClassReaders.setReader(new JerseyApiReader()); }