Commit 4a290714 by Boros Andras

Swagger

parent f8acdc33
......@@ -76,7 +76,12 @@
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.2.2</version>
<version>2.6.1</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.6.1</version>
</dependency>
</dependencies>
......
......@@ -8,20 +8,18 @@ import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.core.io.ClassPathResource;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
@EnableAsync
@EnableScheduling
@EnableSwagger2
@EnableWebMvc
public class ApplicationConfig {
private static final Logger logger = LoggerFactory.getLogger(ApplicationConfig.class);
public ApplicationConfig() {
logger.info("Setting up application configuration...");
}
@Bean
public PropertySourcesPlaceholderConfigurer propertyPlaceholderConfigurer() {
String activeProfile = System.getProperty("spring.profiles.active", "dev");
......
package hu.lanoga.dojo.config;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {
private static final Logger logger = LoggerFactory.getLogger(WebMvcConfig.class);
public WebMvcConfig() {
logger.info("Setting up web mvc configuration...");
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("swagger-ui.html")
.addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**")
.addResourceLocations("classpath:/META-INF/resources/webjars/");
}
}
#------------------Swagger implementation properties------------------
#The title for the spring boot service to be displayed on swagger UI. It will refer to the above value.
swagger.title=Dojo Java GYM
#The description of the spring boot service. It will refer to the above value.
swagger.description=Lanoga gym
#The version of the service. It will refer to the version specified in pom.xml.
swagger.version=@1.0@
#The terms of service url for the service if applicable.
swagger.termsOfServiceUrl=https://www.apache.org/licenses/LICENSE-2.0
#The contact name for the service.
swagger.contact.name=Andras Boros
#The contact url for the service
swagger.contact.url=http://www.lanoga.eu
#The contact email for the service
swagger.contact.email=boros.andras@lanoga.hu
#The license information about this service
swagger.license=Apache License 2.0
swagger.licenseUrl=https://www.apache.org/licenses/LICENSE-2.0
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment