Skip to main content

Java Springboot Interview preparation

Interview Preparation


JAVA

Spring boot - Rapid Application Development

@Configuration - Makes the class as a source for bean definition for the Application Context.

@ComponentScan - Tells spring to look for components, services, configurations


Proper Logging in Spring boot Applications

spring-boot-starter-logging :  dependency already available

spring-logback - is used most of the time

Logger levels(error, trace., info..)

logging.level.root=TRACE - can be set in application.properties

Logger logger = LoggerFactory.getLogger(sample.class)

logback-spring.xml 


Feature of spring Framework

Collection of jars and libraries

1. Lightweight
2. Non-Invasive 
3. IOC 
4. spring container - (creation of object, maintain the lifecycle and DI)
5. Intercepting the business logic using AOP
6. loosely coupled







Comments

Popular posts from this blog

                                                         System Design This blog can help you to Ace your next System design interview, as it contains some of the most asked components. Some of the key concepts asked in the interview: API Gateway: It acts as an intermediary between your application and a set of microservices, taking care of request routing, composition, protocol translation, authentication, rate limiting, and caching. Content Delivery Network: CDN reduces latency and improves the availability of content for users by globally distributing servers that cache and serve content from multiple locations. Data partitioning: It divides a large data set into smaller, more manageable pieces called partitions to improve the performance and scalability of a system by distributing the data across multiple servers. L...
REACT course   Destructing the Function Parameters An object passed to the method can be accessed using dot notation instead you could use de-structuring. Ex: function addUser({name, age, gender}) {} addUser({name: 'Daniel', age: 25, gender: Male}) Spread Operator -> To pullout the values from array and add as comma separated array. Spread operator on object pulls out user key values and add it to extendUser. Ex: const extendUser = {               isAdmin: true,               ...user          };  const hobbies = ["Sports", "cooking"]; for(const hobby of hobbies) {     console.log(hobby); } Anonymous functions - No names infront of the functions const timeout = () => {},   Pass function as a value setTimeout(hadleTimeout, 2000) Reference vs primitive values -> always produce new values for primitive type For arrays like objects mutate original va...