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
| https (one-way) | |
| @RestController | |
| public class HelloController { | |
| @GetMapping("/") | |
| public String index() { | |
| return "Greetings"; | |
| } | |
| } |
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
| import com.fasterxml.jackson.core.JsonProcessingException; | |
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import oracle.AQ.*; | |
| import org.apache.kafka.clients.consumer.ConsumerRecord; | |
| import org.apache.kafka.clients.consumer.ConsumerRecords; | |
| import org.apache.kafka.clients.consumer.KafkaConsumer; | |
| import java.sql.Connection; | |
| import java.sql.DriverManager; | |
| import java.sql.SQLException; |
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
| import com.fasterxml.jackson.core.JsonProcessingException; | |
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import oracle.AQ.*; | |
| import org.apache.kafka.clients.producer.KafkaProducer; | |
| import org.apache.kafka.clients.producer.Producer; | |
| import org.apache.kafka.clients.producer.ProducerRecord; | |
| import java.sql.Connection; | |
| import java.sql.DriverManager; | |
| import java.sql.SQLException; |
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
| { | |
| "title": "Song", | |
| "type": "object", | |
| "properties": { | |
| "title": { | |
| "type": "string", | |
| "not": "null", | |
| "minLength": 1 | |
| }, | |
| "duration": { |
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
| import org.everit.json.schema.Schema; | |
| import org.everit.json.schema.ValidationException; | |
| import org.everit.json.schema.loader.SchemaLoader; | |
| import org.json.JSONObject; | |
| import org.json.JSONTokener; | |
| public class JsonValidator { | |
| public static ClassLoader classLoader = ClassLoader.getSystemClassLoader(); | |
| public static JSONObject jsonSchema = new JSONObject(new JSONTokener(classLoader.getResourceAsStream("SongJsonSchema.json"))); | |
| public static Schema schema = SchemaLoader.load(jsonSchema); |
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
| import oracle.AQ.*; | |
| import java.sql.Connection; | |
| import java.sql.DriverManager; | |
| import java.sql.SQLException; | |
| import java.sql.Struct; | |
| public class AQEnqueue { | |
| public static void main(String[] args) throws SQLException, AQException, ClassNotFoundException { | |
| String JDBC_URL = "jdbc:oracle:thin:@//localhost:1521/ORCLPDB1.localdomain"; |
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
| import oracle.AQ.*; | |
| import java.sql.Connection; | |
| import java.sql.DriverManager; | |
| import java.sql.SQLException; | |
| public class AQDequeue { | |
| public static void main(String[] args) throws SQLException, AQException, ClassNotFoundException { | |
| String JDBC_URL = "jdbc:oracle:thin:@//localhost:1521/ORCLPDB1.localdomain"; |
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
| import com.fasterxml.jackson.annotation.JsonIgnore; | |
| import java.sql.*; | |
| public class Song implements SQLData { | |
| private String sql_type; | |
| private String title; | |
| private int duration; | |
| private String filePath; | |
| public Song() {} |
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
| import oracle.AQ.AQDriverManager; | |
| import oracle.AQ.AQException; | |
| import oracle.AQ.AQQueue; | |
| import oracle.AQ.AQSession; | |
| import java.sql.Connection; | |
| import java.sql.DriverManager; | |
| import java.sql.SQLException; | |
| public class AQStop { |
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
| import oracle.AQ.AQDriverManager; | |
| import oracle.AQ.AQException; | |
| import oracle.AQ.AQQueue; | |
| import oracle.AQ.AQSession; | |
| import java.sql.Connection; | |
| import java.sql.DriverManager; | |
| import java.sql.SQLException; | |
| public class AQStart { |
NewerOlder