13. Spring Boot | Desplegando nuestro API Restful
Introduction to Spring Boot Development Course
Overview of Previous Class
- The video is the 13th installment in a Spring Boot development course, encouraging viewers to subscribe and engage with the content.
- In the previous class, different profiles for development environments were discussed, including quality assurance and others.
Today's Objectives
- The focus of today's lesson is on configuring a new production profile and deploying the application.
Database Setup for Production
Creating a New Database
- A new PostgreSQL database named "restful_Api_production" is created for production use.
Configuration Document Creation
- A configuration document is prepared by copying existing code and modifying it to reflect the production profile settings.
Application Versioning
Updating Application Version
- The version of the application is changed from "snapshot" to "1.0.0," indicating readiness for deployment.
Running Maven Commands
- A Maven update command is executed to ensure no issues arise during deployment.
Compiling and Packaging
Clean Install Command
- The
mvn clean installcommand compiles all code and packages it into a deployable JAR file, making it portable across different environments.
Unit Testing Confirmation
- During compilation, six unit tests are run successfully without any failures or errors, confirming application stability.
Executing the Packaged Application
Running Java Command
- The packaged JAR file is executed using a Java command that specifies running under the production profile.
Embedded Server Functionality
- The embedded Tomcat server initializes automatically on port 8085, allowing immediate access without external server setup.
Verifying Database Operations
Testing Data Persistence
- A test record ("Pet Shop") is saved in the database, confirming successful data persistence within the production environment.
Switching Profiles for Testing
Development Profile Execution
- The same packaged application can be run under a development profile by adjusting parameters in the execution command.
Successful Query Results
- Queries return expected results from both development and production databases, demonstrating versatility in deployment configurations.
Conclusion
Summary of Achievements
- Successfully deployed an initial version of an application as a JAR file in both production and development environments. Viewers are encouraged to like, comment with questions, and share the video.
Turn any video into a summary like this
YouTube links, meetings, lectures. With transcripts, search, and chat.