Notes
Notes - notes.io |
1- @SpringBootApplication(scanBasePackages="com.scb")
@EnableAutoConfiguration: enable Spring Boot’s auto-configuration mechanism
@ComponentScan: enable @Component scan on the package where the application is located (see the best practices)
@Configuration: allow to register extra beans in the context or import additional configuration classes
2- @Configuration
3- @ImportResource({"classpath:/camel/camel-filemanagement-routes.xml"})
4- @Repository
5- @Autowired
6- @JsonProperty("payloadRequest")
7- @Param("entityType") String entityName --
8- @XmlElement(name = "Prty")
9- @XmlSchemaType(name = "string")
10- @Override
11- @Scope(value="prototype")
12- @POST, @DELETE, @PUT, @GET (JAX-RS)
13- @Produces(MediaType.APPLICATION_JSON) (JAX-RS)
14- @Consumes(MediaType.APPLICATION_JSON) (JAX-RS)
15- @Path("/postAceEvent") (JAX-RS)
16- @RequestMapping
17- @RequestURL ---
18- @PathParam (JAX-RS) ( equivalent to @PathVariable)
19- @QueryParam (JAX-RS) (equivalent to @RequestParam)
20- @RequestParam
21- @Qualifier
22- @Controller
23- @Service
24- @RestController (@Controller and @ResponseBody)
25- @Component
26- @EnableAutoConfiguration (https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-auto-configuration.html)
27- @ComponentScan(basePackages = { "com.baeldung.web.controller" })
28- @RequestBody (Converts response object to HttpResponse)
29- @ResponseBody (Converts HttpRequest to Object)
30- @GetMapping ( equivalent to @RequestMapping(method = RequestMethod.GET))
31- @PostMapping (equivalent to @RequestMapping(method = RequestMethod.POST))
32- @PutMapping (equivalent to @RequestMapping(method = RequestMethod.PUT))
33- @PatchMapping (equivalent to @RequestMapping(method = RequestMethod.PATCH))
34- @DeleteMapping (equivalent to @RequestMapping(method = RequestMethod.DELETE))
35- @ExceptionHandler
36- @EnableScheduling (https://dzone.com/articles/schedulers-in-java-and-spring)
37- @Scheduled
Spring Annotation JAX-RS Annotation
@RequestMapping(path = "/troopers" @Path("/troopers")
@RequestMapping(method = RequestMethod.POST) @POST
@RequestMapping(method = RequestMethod.GET) @GET
@RequestMapping(method = RequestMethod.DELETE) @DELETE
@ResponseBody N/A
@RequestBody N/A
@PathVariable("id") @PathParam("id")
@RequestParam("xyz") @QueryParam('xyz")
@RequestMapping(produces = {"application/json"}) @Produces("application/json")
@RequestMapping(consumes = {"application/json"}) @Consumes("application/json")
@Autowired vs @Inject(JSR : Java Specification Request)
@Resource
@RequestMapping(path = "/{id}", method = RequestMethod.GET)
public Stormtrooper getTrooper(@PathVariable("id") String id) throws NotFoundException {
}
@RequestMapping(path = "/{id}", method = RequestMethod.POST)
public Stormtrooper updateTrooper(@PathVariable("id") String id, @RequestBody Stormtrooper updatedTrooper) throws NotFoundException {
return trooperDao.updateStormtrooper(id, updatedTrooper);
}
Hibernate vs JPA vs MyBatis
Comparator vs Comparable
equals() vs toString()
OutOfMemoryError , MemoryLeak, StackOverFlowError (Browser Bookmark)
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team
