Most common annotations in spring boot

broken image
broken image
broken image

java version, operating system, cloud platform, web application etc.property defined in application.yml or application.properties file, system property, environment variable.availability of dependency, resource, or class in the classpath.Spring Boot heavily use annotation to load default configurations and beans based on conditions. Spring Boot does this magic using annotation. default DataSource configuration when it find spring-boot-starter-data-jpa dependency in the classpath.

broken image

default Jackson request and response mapping when it find spring-boot-starter-web dependency in the classpath.You can change the default client to OkHttpClient or ApacheHttpClient by just changing the dependency in the classpath. default HttpClient configuration when it find spring-cloud-starter-openfeign dependency in the classpath.You can change the default embedded tomcat server to Jetty or Undertow by just changing the dependency in the classpath. default embedded Tomcat server when it doesn’t see any server dependency or configuration in the classpath.Spring Boot provides default (auto) configuration for a module when it finds related dependency in the classpath. In this tutorial, we’ll take a look at Conditional Annotations in Spring Boot with examples.

broken image