Skip to content

Instantly share code, notes, and snippets.

@henesgokdag
Created January 1, 2022 10:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henesgokdag/8ca995ca41de025f4e78aecb34db2be2 to your computer and use it in GitHub Desktop.
Save henesgokdag/8ca995ca41de025f4e78aecb34db2be2 to your computer and use it in GitHub Desktop.
@SpringBootApplication()
@EnableSwagger2
@EnableElasticsearchRepositories(basePackages = "org.example")
public class Application {
public static void main(String []args) throws IOException {
SpringApplication.run(Application.class,args);
System.out.println("Hello world");
}
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("org.example"))
.build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment