Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
UsersDojoJava
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LNGCodingDojo
UsersDojoJava
Commits
4a290714
Commit
4a290714
authored
Mar 29, 2017
by
Boros Andras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Swagger
parent
f8acdc33
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
5 deletions
+54
-5
pom.xml
pom.xml
+6
-1
ApplicationConfig.java
src/main/java/hu/lanoga/dojo/config/ApplicationConfig.java
+2
-4
WebMvcConfig.java
src/main/java/hu/lanoga/dojo/config/WebMvcConfig.java
+27
-0
swagger.properties
src/main/resources/swagger.properties
+19
-0
No files found.
pom.xml
View file @
4a290714
...
@@ -76,7 +76,12 @@
...
@@ -76,7 +76,12 @@
<dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<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>
</dependency>
</dependencies>
</dependencies>
...
...
src/main/java/hu/lanoga/dojo/config/ApplicationConfig.java
View file @
4a290714
...
@@ -8,20 +8,18 @@ import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
...
@@ -8,20 +8,18 @@ import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import
org.springframework.core.io.ClassPathResource
;
import
org.springframework.core.io.ClassPathResource
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.web.servlet.config.annotation.EnableWebMvc
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
@Configuration
@Configuration
@EnableAsync
@EnableAsync
@EnableScheduling
@EnableScheduling
@EnableSwagger2
@EnableSwagger2
@EnableWebMvc
public
class
ApplicationConfig
{
public
class
ApplicationConfig
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ApplicationConfig
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ApplicationConfig
.
class
);
public
ApplicationConfig
()
{
logger
.
info
(
"Setting up application configuration..."
);
}
@Bean
@Bean
public
PropertySourcesPlaceholderConfigurer
propertyPlaceholderConfigurer
()
{
public
PropertySourcesPlaceholderConfigurer
propertyPlaceholderConfigurer
()
{
String
activeProfile
=
System
.
getProperty
(
"spring.profiles.active"
,
"dev"
);
String
activeProfile
=
System
.
getProperty
(
"spring.profiles.active"
,
"dev"
);
...
...
src/main/java/hu/lanoga/dojo/config/WebMvcConfig.java
0 → 100644
View file @
4a290714
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/"
);
}
}
src/main/resources/swagger.properties
0 → 100644
View file @
4a290714
#------------------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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment