This video describes the basics of leveraging Spring profiles as a way to load alternate configurations based on the environment.
- [Instructor] There are several ways…to load environment-specific configuration…in the Spring world.…In this course, we will focus on two of those ways.…And, they both leverage the use of Spring profiles.…In a nutshell, Spring profiles allow you to load…alternate configurations based on environment variables…or command-line parameters.…So, let's jump into the first method that we will discuss.…We need to start by doing a little bit of refactoring…of our embedded class.…So, let's navigate to source main Java.…
And, in our calm Lynda common package,…we will open up the config package and go to app config.…Now, the first thing that we need to do is…we need to go down to this embedded class,…and we need to add in new attribute.…I want to call that attribute preamble.…Now, let's jump down to our constructor here,…and let's add a parameter to our constructor…called preamble,…and then, we will set the class attribute…equal to that parameter.…
One final change that we need to make…is down here in the actual execute method,…
AuthorFrank P Moley III
- Introduction to Spring
- Configuring the ApplicationContext
- Using the Spring expression language
- Configuring proxies
- Autowiring beans
- Using lifecycle methods
- Configuring beans with XML
- Understanding the initialization phases of the bean lifecycle
- Aspect-oriented programming and Spring
Skill Level Intermediate
Learning Spring with Spring Bootwith Frank P Moley III1h 38m Intermediate
1. Spring Overview
2. Configuring the Application Context
3. Annotation-Based Configuration
4. XML-Based Configuration
5. Bean Lifecycle
6. Aspect Oriented Programming
Next steps2m 10s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.