Using Environment object - Microservice configuration with Spring Boot [09]

preview_player
Показать описание

Learn how to look up property information and the current profile in your code in Spring Boot applications. Write code to look up config values and resolve them using the Environment object.

#JavaBrains #Microservices #SpringBoot #Configuration #Course
Рекомендации по теме
Комментарии
Автор

you are improving so many techies lives, God Bless you sir.

venkatkodali
Автор

Hi Kaushik sir, please add few courses to learn algorithms and DS. Your teaching skills are awesome.

reddibabu
Автор

Using @PropertySources we can load properties mentioned in an external file. These properties are loaded into Environment. We can use Environment to access properties loaded from an external file. I found this use-case to use Environment a very useful.

mohammadwaseemraza
Автор

I think that a correct use of environment is to check when diagnosing. If we receive unexpected values on properties. Then we can discover what is happening.

yonosetampoco
Автор

Thank you for more specific information

praveenkumarkodge
Автор

Why are you so smart? Thaaanks a lot,

angelakarapetyan
Автор

you can use Environment in order to validate if input profile is one of the valid allowed profiles.

rashpalgill
Автор

You are Awesome Bro You are A Hero You ROCK THE WORLD BRO YOU ARE SUPER AND THE BEST

mohammedshabbirahmed
Автор

@Java Brains: Please add more content on spring boot microservices like level 4 level 5 etc...

ravindrakumar-jhcu
Автор

Hi Sir Is Environment Object auto registered as bean in spring IOC container?

manojkumarpadarthi
Автор

Not able to find spring cloud config server related video

shaikhraifoddin
Автор

Hi Kaushik, The series is amazing. Thank you. I have a question, how do I take the the DB connection parameters as a rest API input from the user and connect to a that database , ideally that refreshes the DB connection at every API request without having to restart the spring application? Can I make use of the properties configuration somehow? How to do that along with spring data JPA repo?

gauravmam
Автор

i think, we should like (or dislike) the video if we watch it.
there are 32K views and only 600+ + 27 comments and responses. We should learn to appreciate the efforts.
Also it will serve as a feedback as well...

talkabu
Автор

Kaushik, Is the Environment Controller exists in the spring inbuilt framerwork itself? Or do we need to have any dependency war?

easwargaming
Автор

Kaushik, have an query ....how to communicate two services in micro service and if one service is not responding what is the behavior for other one...these two serveries are dependent each other.

dowlathbashag
Автор

So is injecting a property vs using Environment.getProperty effectively the same thing or am I missing something?

danepane
Автор

Hey Kaushik, how you get to know these Hidden gems of Spring Boot like Environment class :-), Please suggest

aneksingh
Автор

Kaushik, thanks for wonderful teaching. one question, if we combine all the profiles together and deploy the jar, let's say in dev, won't the dev server will have prod values as well, won't that be an issue?

MultiMukesh
Автор

Title: Using environment object.
Conclusion: You should not be using environment object.

dineshshekhawat
visit shbcf.ru