File tree 3 files changed +6
-22
lines changed
3 files changed +6
-22
lines changed Original file line number Diff line number Diff line change 8
8
<version >1.0.0-SNAPSHOT</version >
9
9
10
10
<properties >
11
- <version .spring>2.3.3.RELEASE </version .spring>
11
+ <version .spring>2.7.18 </version .spring>
12
12
</properties >
13
13
14
14
26
26
27
27
<!-- Needed to automatically generate the OpenAPI schema-->
28
28
<dependency >
29
- <groupId >io.springfox </groupId >
30
- <artifactId >springfox-boot-starter </artifactId >
31
- <version >3.0 .0</version >
29
+ <groupId >org.springdoc </groupId >
30
+ <artifactId >springdoc-openapi-ui </artifactId >
31
+ <version >1.8 .0</version >
32
32
</dependency >
33
33
<dependency >
34
34
<groupId >com.h2database</groupId >
Original file line number Diff line number Diff line change 2
2
3
3
import org .springframework .boot .SpringApplication ;
4
4
import org .springframework .boot .autoconfigure .SpringBootApplication ;
5
- import org .springframework .context .annotation .Bean ;
6
- import springfox .documentation .builders .PathSelectors ;
7
- import springfox .documentation .spi .DocumentationType ;
8
- import springfox .documentation .spring .web .plugins .Docket ;
9
5
10
6
@ SpringBootApplication
11
7
public class Application {
12
8
13
9
public static void main (String [] args ){
14
10
/*
15
11
Start application. Schema accessible at:
16
- http://localhost:8080/swagger-ui/index.html
17
12
http://localhost:8080/v3/api-docs
18
13
*/
19
14
SpringApplication .run (Application .class );
20
15
}
21
-
22
-
23
- @ Bean
24
- public Docket swaggerApi () {
25
- /*
26
- Needed to activate and configure the OpenAPI schema
27
- */
28
- return new Docket (DocumentationType .OAS_30 )
29
- .select ()
30
- .paths (PathSelectors .ant ("/api/**" ))
31
- .build ();
32
- }
33
16
}
Original file line number Diff line number Diff line change 1
- spring.datasource.url =jdbc:h2:mem:testdb; DB_CLOSE_DELAY=-1;
1
+ spring.datasource.url =jdbc:h2:mem:testdb; DB_CLOSE_DELAY=-1;
2
+ springdoc.swagger-ui.enabled =true
You can’t perform that action at this time.
0 commit comments