This file contains hidden or 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
@MappedEntity | |
@AllArgsConstructor(access = AccessLevel.PACKAGE) | |
@NoArgsConstructor | |
@Data | |
@EqualsAndHashCode | |
public class Movie { | |
@Id | |
@GeneratedValue | |
private String id; | |
private String title; |
This file contains hidden or 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
$ curl localhost:8080/movie | jq |
This file contains hidden or 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
HTTP/1.1 200 OK | |
date: Wed, 26 Jan 2022 19:19:29 GMT | |
Content-Type: application/json | |
content-length: 199 | |
connection: keep-alive | |
[ | |
{ | |
"id": "620a6521ca65e72ff82ef9ba", | |
"title": "Back to the Future", |
This file contains hidden or 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
$ mn create-app --build=gradle --jdk=11 --lang=java --test=spock codes.recursive.oci-atp-mongo |
This file contains hidden or 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
$ curl localhost:8080/movie/620a6521ca65e72ff82ef9ba | jq |
This file contains hidden or 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
$ curl -i -X DELETE localhost:8080/movie/61f19db7c83ba32b4ca5a468 |
This file contains hidden or 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
> use mnajd | |
> db.new_collection.insert({ some_key: "some_value" }) |
This file contains hidden or 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
$ mongosh mongodb://admin:[pass]@HVG9ND7XIBSAEGV-DEMOAJD.adb.us-phoenix-1.oraclecloudapps.com:27017/admin\?authMechanism=PLAIN\&authSource=\$external\&ssl=true\&retryWrites=false\&loadBalanced=true |
This file contains hidden or 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
select | |
id, | |
m.data.title, | |
m.data.description, | |
m.data.runtimeMinutes, | |
m.data.rating | |
from movie m; |
This file contains hidden or 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
[direct: mongos] mnajd> show dbs | |
mnajd 344 kB | |
[direct: mongos] mnajd> show collections | |
new_collection |