generated from pagopa/template-java-spring-microservice
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from pagopa/PAGOPA-1998-lap-sviluppo-modificar…
…e-lattuale-generazione-pdf [PAGOPA-1998] PDF new path
- Loading branch information
Showing
23 changed files
with
4,327 additions
and
4,459 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
src/main/java/it/gov/pagopa/bizeventsservice/config/ContentNegotiationConf.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package it.gov.pagopa.bizeventsservice.config; | ||
|
||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.http.MediaType; | ||
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; | ||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||
|
||
/** | ||
* This configuration is required ignore the 'accept' header in the request. | ||
* If the client uses a different value of the response then SpringBoot goes wrong because the response type doesn't match. | ||
* We can ignore the accept header from the client. | ||
* <p> | ||
* see more information in this GitHub <a href="https://github.com/swagger-api/swagger-ui/issues/5649">issue</a> | ||
*/ | ||
@Configuration | ||
public class ContentNegotiationConf implements WebMvcConfigurer { | ||
|
||
@Override | ||
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) { | ||
configurer | ||
.ignoreAcceptHeader(true) | ||
.defaultContentType(MediaType.ALL); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 9 additions & 9 deletions
18
src/test/java/it/gov/pagopa/bizeventsservice/controller/BaseControllerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
package it.gov.pagopa.bizeventsservice.controller; | ||
|
||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; | ||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.test.web.servlet.MockMvc; | ||
|
||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; | ||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; | ||
|
||
@SpringBootTest | ||
@AutoConfigureMockMvc | ||
class BaseControllerTest { | ||
@Autowired | ||
private MockMvc mockMvc; | ||
@Autowired | ||
private MockMvc mockMvc; | ||
|
||
@Test | ||
void shouldRespondOKtoHeartBeat() throws Exception { | ||
mockMvc.perform(get("/info")).andExpect(status().isOk()); | ||
} | ||
@Test | ||
void shouldRespondOKtoHeartBeat() throws Exception { | ||
mockMvc.perform(get("/info")).andExpect(status().isOk()); | ||
} | ||
} |
Oops, something went wrong.