File tree Expand file tree Collapse file tree
miner/src/main/java/fr/rakambda/channelpointsminer/miner/util/json
main/java/fr/rakambda/channelpointsminer/viewer/config
test/java/fr/rakambda/channelpointsminer/viewer/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package fr .rakambda .channelpointsminer .miner .util .json ;
22
3+ import com .fasterxml .jackson .annotation .JsonInclude ;
34import com .fasterxml .jackson .annotation .JsonSetter .Value ;
45import com .fasterxml .jackson .core .JsonProcessingException ;
56import com .fasterxml .jackson .core .type .TypeReference ;
@@ -53,7 +54,7 @@ public static JsonMapper getMapper(){
5354 .visibility (GETTER , NONE )
5455 .visibility (SETTER , NONE )
5556 .visibility (CREATOR , NONE )
56- .serializationInclusion ( NON_NULL )
57+ .defaultPropertyInclusion ( JsonInclude . Value . construct ( NON_NULL , NON_NULL ) )
5758 .withConfigOverride (List .class , o -> o .setSetterInfo (Value .forValueNulls (AS_EMPTY )))
5859 .addModule (new JavaTimeModule ())
5960 .build ();
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ ext["junit-jupiter.version"] = libs.versions.junitVersion.get()
1717dependencies {
1818 implementation(" org.springframework.boot:spring-boot-starter-data-jpa" )
1919 implementation(" org.springframework.boot:spring-boot-starter-thymeleaf" )
20- implementation(" org.springframework.boot:spring-boot-starter-web " )
20+ implementation(" org.springframework.boot:spring-boot-starter-webmvc " )
2121 implementation(" org.apache.logging.log4j:log4j-layout-template-json" )
2222 implementation(" org.jspecify:jspecify:1.0.0" )
2323
@@ -32,6 +32,7 @@ dependencies {
3232 testImplementation(libs.bundles.jsonUnit)
3333
3434 testImplementation(" org.springframework.boot:spring-boot-starter-test" )
35+ testImplementation(" org.springframework.boot:spring-boot-starter-webmvc-test" )
3536
3637 annotationProcessor(" org.springframework.boot:spring-boot-configuration-processor" )
3738 annotationProcessor(" org.projectlombok:lombok" )
Original file line number Diff line number Diff line change 22
33import lombok .RequiredArgsConstructor ;
44import lombok .extern .log4j .Log4j2 ;
5- import org .springframework .boot .autoconfigure . orm . jpa .HibernatePropertiesCustomizer ;
5+ import org .springframework .boot .hibernate . autoconfigure .HibernatePropertiesCustomizer ;
66import org .springframework .context .annotation .Configuration ;
77import javax .sql .DataSource ;
88import java .sql .Connection ;
Original file line number Diff line number Diff line change 33import fr .rakambda .channelpointsminer .viewer .api .data .BalanceData ;
44import fr .rakambda .channelpointsminer .viewer .api .data .ChannelData ;
55import org .springframework .beans .factory .annotation .Autowired ;
6- import org .springframework .boot .test .autoconfigure .web .servlet .WebMvcTest ;
6+ import org .springframework .boot .test .context .SpringBootTest ;
7+ import org .springframework .boot .webmvc .test .autoconfigure .WebMvcTest ;
78import org .springframework .test .context .bean .override .mockito .MockitoBean ;
89import org .springframework .test .web .servlet .MockMvc ;
910import org .junit .jupiter .api .Test ;
1415import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .content ;
1516import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .status ;
1617
18+ @ SpringBootTest
1719@ WebMvcTest (ApiController .class )
1820class ApiControllerTest {
1921 @ MockitoBean
You can’t perform that action at this time.
0 commit comments