-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5def87a
commit b153a67
Showing
3 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
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,17 @@ | ||
package pl.writeonly.omnibus.config | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude | ||
import com.fasterxml.jackson.databind.ObjectMapper | ||
import org.springframework.beans.factory.annotation.Autowired | ||
import org.springframework.context.annotation.Configuration | ||
|
||
@Configuration | ||
class Config { | ||
|
||
@Autowired | ||
private lateinit var objectMapper: ObjectMapper | ||
|
||
fun customizeObjectMapper() { | ||
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL) | ||
} | ||
} |
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 @@ | ||
INSERT INTO post(id, title, content) VALUES (1, 'Test post 1', 'Content1'); |
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,5 @@ | ||
CREATE TABLE post ( | ||
id BIGINT AUTO_INCREMENT PRIMARY KEY, | ||
title VARCHAR(400) NOT NULL, | ||
content VARCHAR(2000) NULL | ||
); |