
Discover how GitHub Copilot accelerates Java and Spring Boot development in VS Code, generate and refactor code, build a RESTful API with models and controllers, and create a React frontend.
Discover a hands-on, sectioned course with quizzes and assignments, featuring MySQL setup, Visual Studio Code with Copilot and Copilot chart, and support via Q&A.
Download the completed projects zip, unzip it, and use the reference code to build end to end projects in the next few sections; note Copilot's code may differ.
Explore GitHub Copilot as an AI pair programmer that integrates with IDEs, powered by OpenAI Codex, and provides auto completions, code suggestions, snippets, explains complex code, and documentation.
Explore Copilot limitations in code quality and reliability, context misalignment, licensing concerns, and internet dependence, and learn to review, test, and enforce project requirements, quality, and security.
Visual Studio Code provides access to GitHub Copilot and Copilot Chat, while IntelliJ IDEA requires an enterprise Copilot subscription for chat access; the course covers using other IDEs.
Set up GitHub Copilot in Visual Studio Code by installing the Copilot and Copilot chat extensions, logging in with GitHub, and noting the free trial and subscription options.
Install Java extensions in Visual Studio Code, including Red Hat language support, the Java extension pack, plus Spring Initializer Java support, Spring Boot dashboard, and Spring Boot tools.
Create a maven project in Visual Studio Code using archetype quick start, set group id com.bharat.copilot, artifact basics, and update pom.xml to Java 21 and JUnit 5.
Explore how GitHub Copilot generates Java code for a factorial use case, using inline chat and prompts to create a factorial class with a main method and testing.
Learn to use Copilot to explain Java code by selecting a method and invoking the slash explain command, which opens a chat window and provides a detailed factorial explanation.
Use Copilot chat to debug a Java factorial method, identify a negative input causing a stack overflow, and implement a guard that throws an illegal argument exception for non-negative integers.
Leverage Copilot chat to review and improve a Java factorial function, switch from recursion to an iterative for loop, and adopt big integer for large inputs.
Build a Java task manager: implement a Task class with a description and done flag, and a TaskManager to add tasks, list them, and mark tasks as done.
Generate unit tests for the Task Manager class with Copilot chat using the /tests command, auto-creating JUnit 5 tests, fixing dependencies, and validating add, list, and mark done scenarios.
Add a remote remove task method to the task manager that deletes a task by description, looping through tasks and removing matches, validated by a unit test.
Explore GitHub Copilot chat and its slash commands across workspace, VS Code, and terminal to explain code, generate tests, fix issues, or create new projects, with links to the documentation.
Create a product model with id, name, and quantity, and implement an inventory manager that uses a map to add, remove, list, and update products by id and quantity.
Review and improve a Java inventory manager using Copilot chat. Focus on error handling for missing IDs, returning lists instead of prints, adding Javadoc, and implementing existence checks on updates.
Use GitHub Copilot as a pair programmer to build patient use case: list patients, add patient (first name, last name, age), and record clinical data (component, value) to a database.
Examine how Copilot functions as an ai pair programmer to plan a rest api backend with Java Spring Boot, Hibernate, and MySQL, and a React frontend with Redux and Axios.
Set up a spring boot project in Visual Studio Code with Spring Initializr, Maven, and dependencies Spring Web, Spring Data JPA, and MySQL Driver.
Set up the clinicals database for a spring boot rest app by downloading clinicals.sql, pasting it into mysql workbench, creating the database and patient and clinical_data tables with sample data.
Create JPA entity classes for patient and clinical data, define one-to-many and many-to-one relationships, configure Jakarta persistence, and adjust table names and fetch types.
Create Spring Data JPA repositories for patient and clinical data models, organizing code under clinical API repos, implementing CRUD operations with Copilot-generated repository interfaces.
Implement rest controllers for patient and clinical data using their repositories, exposing a rest api with crud operations and url mappings.
Learn to configure the data source with Copilot by editing application.properties. Set spring.datasource.url to jdbc:mysql://localhost:3306/clinicals, provide the username and password, and set server.servlet.context-path to /api or /clinical-services.
Launch the spring boot application on port 8080 and test its RESTful API using postman to retrieve all patients or a single patient, and create new patients via json payloads.
Add a rest endpoint to save clinical data by patient id using a clinical data request dto, fetch the patient, attach it, and persist with a creation timestamp.
Learn to create unit tests for the patient controller using JUnit and slash test command. Use Mockito with mock MVC, mock the repository, and verify interactions in a mock environment.
Add error handling to the patient controller by throwing a custom patient not found exception when a patient is not found, and centralize handling with an @ExceptionHandler method for responses.
Create a React application named clinicals-app with npx create-react-app, install react-router-dom, axios, and react-toastify, then start the app and open it in Visual Studio Code.
Configure routing with react router dom's browser router to render three placeholder components—home, add patient, and add clinicals—and pass patient IDs via the URL while wiring routes in app.js.
Implement the home page to fetch patient data from a Spring Boot backend with axios and render it as an HTML table, addressing the CORS policy.
Debug a cors error in a spring boot app using copilot, add cross origin headers to the patient and clinical data controllers, and verify the React frontend loads patient data.
Navigate to the add patient route and implement a form with first name, last name, and age, wiring it to an Axios API call to save the patient.
Enable toast notifications in React using react-toastify to show a patient added message, configure imports and a toast container, and set a bottom center auto-close after 2 seconds.
Implement the add clinical data component in two steps: render the patient details and present a form to add clinical data, using the patient id from the URL.
create a html form to add a patient's clinical data with component name and component value, submit via axios to a back-end api, and display a success toast.
Add back links to the home screen and add clinical screens by wrapping forms in a div, importing Link from react-router-dom, and wiring navigation to go back.
Learn to style a single-page application with Copilot by enhancing a table interface, applying borders, padding, colors, hover effects, and styling inputs and buttons for a polished user interface.
Build a Spring Boot web app to search flights by from city and date, display results, select a flight, input passenger details, and create a reservation with GitHub Copilot.
Download the SQL file from resources and create a reservation database in MySQL Workbench with flight, passenger, and reservation tables, including foreign keys and sample data.
Set up a flight reservation spring boot project, download the zip, and configure dependencies to enable thymeleaf templates, jpa, and mysql for search and reservation flows.
Create flight, passenger, and reservation JPA entities with fields, migrate packaging to Jakarta, and apply Lombok @Data, defining 1-to-1 relationships via foreign keys.
Generate repository interfaces for flight, passenger, and reservation by extending Spring Data JPA repositories, placing them in a repos package, using Copilot to rename and adapt entities.
Create the controller layer to render the UI by implementing a flight controller that serves the find flights thyme leaf template at /flight reservation/find flights.
Implement find flights handler that processes the post form submission, fetches flights from the flight repository by from, to, and departure date, and forwards them to display flights thymeleaf template.
Learn how to create a find flights method in the flight repository with jpql annotations, using Copilot chat to generate exact parameter mappings for from, to, and departure date.
Test the find flights feature by starting the app, refreshing the find flights page, and searching Austin to New York on 2024-02-05; verify results render via display flights.html.
Implement a show complete reservation flow by handling the flight id as a request parameter, fetching flight details via the flight repository, and rendering them in complete reservation thymeleaf template.
Implement services layer by creating a reservation data transfer object with flight id, first name, last name, email, and phone, plus a reservation service and its impl to save bookings.
Implement the book flight method by marking the reservation service with @Service, injecting repositories, fetching the flight by id, and saving the passenger and reservation.
Implement the complete reservation flow in a Spring Boot app by handling the post mapping, invoking the reservation service's book flight, and returning a confirmation with the reservation id.
Perform an end-to-end test of the application by starting the server, entering origin and destination on the find flights page, selecting a flight, and confirming a reservation in the database.
Use Copilot to generate Thymeleaf templates for a find flights form, including from, to, and departure date fields, within a Spring Boot project.
Create two restful endpoints from scratch with Copilot: a get /reservations/{id} to fetch a reservation from the repository, and a post /reservations to update check-in and bags via a dto.
Design a single page Angular app for flight check-in that fetches reservation data via a Spring Boot REST API, renders details, and updates check-in and bags.
Install Angular on your machine with npm install -g @angular/cli, verify with ng --help and ng new, then install the Angular Language Service extension in Visual Studio Code and restart.
Create and scaffold an Angular project using ng commands, install Angular forms, and generate start check in, check in, and confirm check in components, plus a service for API calls.
Configure the app routes by editing app routes.ts to define three paths: start check in, check in, and confirm check in; enable routing with the router module and outlet.
Implement a service class to call the Spring Boot backend, fetching and updating reservations. Configure the Angular HTTP client and expose getReservationById and updateReservation via GET and POST requests.
Start the Angular app with ng serve to view home page on port 4200, then replace the app component HTML with flight check in and route to start check in.
Implement the start check-in flow by binding user input with ngModel, using the forms module, and fetching reservation data via a service to navigate to the check-in screen.
Learn to complete the check-in workflow by binding the number of bags, displaying reservation details with flight and passenger information, and triggering a backend check-in call in the Angular component.
Implement the check-in flow by building a custom request with reservation id, checked in flag, and number of bags, and sending it to the backend to update and confirm.
Dockerize your flight reservation spring boot app with GitHub Copilot, generate a Dockerfile, build an image, run a container, and create a Docker Compose with MySQL service and app.
Build a Spring Boot jar for the flight reservation app by running mvn clean install, which compiles, tests, and packages the artifact into target/flight-reservation-0.0.1-snapshot.jar for use in subsequent dockerization steps.
Dockerize a Spring Boot app by creating a docker file with a Java base image, setting /app as workdir, copying the target jar, and running java -jar on startup.
Create a docker compose file that launches two services, a mysql container and a spring boot app, using a reservation database and root password 1234.
Automate database setup by mounting an init SQL script into the MySQL container and leveraging Docker Compose to create flights, passengers, and reservations tables with sample data on startup.
Configure health checks to ensure the spring boot service starts only after the MySQL container is healthy, using a mysql admin ping health check with 10s interval and five retries.
Replace the hardcoded data source URL, username, and password in application.properties with environment variables from Docker Compose, reading the spring data source URL, username, and password at runtime.
Set the build context to current directory in the flight reservation app Docker Compose file so Docker can locate the Dockerfile and build image before you run Docker Compose up.
Shows docker compose in action to build a spring boot jar using docker environment variables, launch MySQL and app containers, and test end-to-end flight reservations.
Thank learners for taking the course and encourage them to share achievements on LinkedIn. Tag the instructor, invite ratings and reviews, and promote the bonus lecture with maximum discounted coupons.
Embark on a journey to revolutionize your coding workflow with "GitHub Copilot for Java and Spring Boot Developers", the course designed to turn GitHub's AI into your most trusted coding partner. This comprehensive guide is tailored specifically for Java and Spring Boot developers seeking to harness the full potential of GitHub Copilot.
Whether you're tackling complex web applications, automating routine tasks, or exploring new algorithms, this course will provide you with the knowledge to integrate Copilot into your development process seamlessly. Through practical examples and real-world scenarios, you'll learn how to:
Navigate the Basics: Understand the fundamentals of GitHub Copilot, set it up, and customize it for your Java and Spring Boot environment.
Code with AI: Leverage Copilot's AI to write better code, faster. Watch as it autocompletes functions, generates code snippets, and offers up solutions you hadn't even considered.
Boost Productivity: Discover strategies to increase your coding efficiency, reduce bugs, and save valuable time on project development.
Best Practices: Learn the dos and don'ts, and how to maintain best coding practices while working with an AI pair programmer.
Troubleshoot and Optimize: Fine-tune Copilot's suggestions for your specific needs, and troubleshoot common issues that arise during development.
By the end of this course, GitHub Copilot won't just be a tool; it will be an indispensable extension of your coding intellect. Sign up today to redefine the way you code with Java and Spring Boot. In this course you will
Experience Copilot's magic: code generation, review, and refactoring made easy
Utilize Copilot for clear code explanations and efficient debugging
Progress from simple to complex Java programs, mastering Copilot along the way
Develop a patient clinicals REST API using Spring Boot
Quickly create JPA Model Classes, Spring Dat Repositories, and Rest Controllers with Copilot
Effortlessly learn to create and run unit tests for your applications
Build a frontend using React with Copilot
Quickly Dockerize your Spring Boot Application
Swiftly generate and navigate React components for seamless screen transitions
Skip Google and Stack Overflow; let Copilot diagnose and fix coding errors directly