How to Create Spring RESTful API without using Spring Boot
Most Spring Tutorials available online teach you how to create/secure a Rest API with Spring boot. However, sometimes there will be specific use cases where you …
Favourite tutorials for developers
Most Spring Tutorials available online teach you how to create/secure a Rest API with Spring boot. However, sometimes there will be specific use cases where you …
Spring Tool Suite (STS) is an Eclipse-based development environment that is customized for the development of Spring applications. It can be used as a separate standalone IDE or as a plug-in in Eclipse. In this article, you will see how to install STS as a plug-in in your existing Eclipse IDE.
We already looked at exception handling in a Spring Boot application. The other side of the coin is to validate the incoming data to our application. Lack of validation can lead to bad data in your database. In other words, it can adversely impact downstream processes, business insights and the overall functioning of your application negatively. The key to building a robust Spring Boot microservice is to validate the incoming data. In this post, we are going to look at the process of handling validations in Spring Boot application.
Exception Handling is one of the most important aspects of a production-level Spring Boot Microservice. In the last post Creating REST API using Spring Boot, we had added the functionality to read, create and update records using our application. However, our application was not very robust. In this post, we will look at exception handling in a Spring Boot application.
This tutorial show you how to integrate Jersey web application with Spring framework. Technologies used :Jersey 1.8, Spring 3.0.5.RELEASE, Eclipse 3.6, Maven 3
In this Spring auto component scanning tutorial, you learn about how to make Spring auto scan your components. In this article, we show you how to do component filter in auto scanning process.
Normally you declare all the beans or components in XML bean configuration file, so that Spring container can detect and register your beans or components. Actually, Spring is able to auto scan, detect and instantiate your beans from pre-defined project package, no more tedious beans declaration in in XML file. Following is a simple Spring project, including a customer service and dao layer. Let’s explore the different between declare components manually and auto components scanning in Spring.
In Spring framework, when your class contains multiple constructors with same number of arguments, it will always cause the constructor injection argument type ambiguities issue. To fix it, you should always specify the exact data type for constructor, via type attribute. Note: It’s always a good practice to explicitly declared the data type for each constructor argument, to avoid constructor injection type ambiguities issue above.
Since Spring 3.0, Spring supports for the standard JSR 330: Dependency Injection for Java. In Spring 3 application, you can uses standard: 1 – @Inject instead of Spring’s @Autowired to inject a bean, 2 – @Named instead of Spring’s @Component to declare a bean. Those JSR-330 standard annotations are scanned and retrieved the same way as Spring annotations, the integration just happened automatically, as long as the following jar in your classpath.
A simple Spring example to show you how to dependency inject a bean via setter method, the most common used DI method.