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
package com.pluralsight.jdbc.course.m7c2; | |
import java.sql.*; | |
public class OrderComponent | |
{ | |
public static void main(String[] args) throws SQLException | |
{ | |
int customer = 112; | |
LineItem lineItem = |
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
package com.pluralsight.jdbc.course.m6c2; | |
import java.sql.*; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class Procedures | |
{ | |
private static final String URL | |
= "jdbc:mysql://localhost:3306/classicmodels?user=root&password=my-secret-pw"; |
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
package com.pluralsight.jdbc.course.m6c2; | |
import java.sql.*; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class Procedures | |
{ | |
private static final String URL | |
= "jdbc:mysql://localhost:3306/classicmodels?user=root&password=my-secret-pw"; |
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
package com.pluralsight.jdbc.course.m6c1; | |
import java.io.FileInputStream; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.Reader; | |
import java.sql.*; | |
public class SavesAndReadBlobsAndClobs | |
{ |
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
package org.async; | |
import java.util.concurrent.CompletableFuture; | |
public class Main | |
{ | |
public static void main(String[] args) | |
{ | |
// TODO: 7/10/21 Create a simple Task | |
// TODO: 7/10/21 Add sleep to thread, for the asynchronous task to be executed |
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
package com.example.infrastructure; | |
import org.h2.tools.Server; | |
import java.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.SQLException; | |
import java.sql.Statement; | |
public class DBLauncher |
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
package org.example; | |
import com.fasterxml.jackson.core.type.TypeReference; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import java.io.IOException; | |
import java.net.URI; | |
import java.net.http.HttpClient; | |
import java.net.http.HttpRequest; | |
import java.net.http.HttpResponse; |
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
package com.pablohdz.application; | |
import com.pablohdz.entities.Person; | |
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Optional; |
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
final String className = file.readUTF(); | |
final String personName = file.readUTF(); | |
final int age = file.readInt(); | |
final Class<?> personClass = Class.forName(className); | |
final Constructor<?> constructor = | |
personClass.getConstructor(String.class, int.class); | |
return (Person) constructor.newInstance(personName, age); |
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
# Build Stage | |
FROM maven:3.8.1-openjdk-11-slim AS build | |
COPY src /home/app/src | |
COPY pom.xml /home/app | |
RUN mvn -f /home/app/pom.xml clean package | |
# Package stage | |
FROM openjdk:11-jre-slim | |
COPY --from=build /home/app/target/name-file-1.0-SNAPSHOT.jar /usr/local/lib/demo.jar | |
ENV PORT=8080 |