1

I have the working project in Spring boot which was a standalone app. Now, to modularize, I have split the app and put the api in a module. Earlier the swagger-ui.html page was working, but after this, it is not working.

my pom.xml has these 2 dependencies

<dependency>
    <groupId>org.springdoc</groupId>
    <artifactId>springdoc-openapi-ui</artifactId>
    <version>1.5.1</version>
</dependency>
<dependency>
    <groupId>org.springdoc</groupId>
    <artifactId>springdoc-openapi-data-rest</artifactId>
    <version>1.5.1</version>
</dependency>

My Application.java has the following code

@Bean
@Profile("!prod")
public OpenAPI caffeAPIRegistry() {
    return new OpenAPI()
            .info(new Info().title("My Awesome API")
                    .description("Powering UI")
                    .version("v3.0.0")
                    .license(new License().name("google  Inc.,").url("https://google.com")));
}

The pom.xml fragment for the parent project mapping

<parent>
    <artifactId>API_Project</artifactId>
    <groupId>com.abc</groupId>
    <version>2.0.0.RELEASE</version>
</parent>

I have been searching for a long time in internet if moving api as a module might require any other change, but could not find any help.

Debargha Roy
  • 2,320
  • 1
  • 15
  • 34
Saran
  • 99
  • 2
  • 14
  • Can you specify how you're modularizing it? What I mean is, are you splitting them into 2 different projects entirely, or, are you creating one project within another project? Basically, how does the project look after modularizing? – Debargha Roy May 18 '21 at 13:33

1 Answers1

1

Are the interfaces with the REST annotations in a different package? if yes then that is the issue.

Suciu Andrei
  • 131
  • 4