top of page

Spring Annotation

  • Writer: Anand Nerurkar
    Anand Nerurkar
  • Apr 30, 2024
  • 1 min read

Updated: Jun 20, 2024

@SpringBootApplication

  • @EnableAutoConfiguration

  • @Configuration

  • @ComponenetScan


@configuration,

@Bean

This is being used for java based configuration and if you so not want spring ioc to manage life cycle , then make use of this.



By default, spring beans are eagerly loaded, so load it lazily, we make use of @Lazy


@ConfigurationProperties

@Value will retrieve data from application.propeties file. but if we want to retrieve it from other custom properties file, then we have to use @propertySource along with @Value



@pathvariable /v1/{id}


path variable is mandatory part of request in case id is missing 404 is issued-resource not found


@RequestPAram /v1/idbyparam?id=1 , id is optional ,so still your endpoint will work





 
 
 

Recent Posts

See All
Best Chunking Practices

1. Chunk by Semantic Boundaries (NOT fixed size only) Split by sections, headings, paragraphs , or logical units. Avoid cutting a sentence or concept in half. Works best with docs, tech specs, policie

 
 
 
Future State Architecture

USE CASE: LARGE RETAIL BANK – DIGITAL CHANNEL MODERNIZATION 🔹 Business Context A large retail bank wants to “modernize” its digital channels (internet banking + mobile apps). Constraints: Heavy regul

 
 
 

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
  • Facebook
  • Twitter
  • LinkedIn

©2024 by AeeroTech. Proudly created with Wix.com

bottom of page