<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Spring on SivaLabs</title><link>https://www.sivalabs.in/tags/spring/</link><description>Recent content in Spring on SivaLabs</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 10 Nov 2026 12:11:30 +0530</lastBuildDate><atom:link href="https://www.sivalabs.in/tags/spring/rss.xml" rel="self" type="application/rss+xml"/><item><title>Philip's Testing Spring Boot Applications Masterclass Course Review</title><link>https://www.sivalabs.in/blog/philip-testing-spring-boot-applications-masterclass-course-review/</link><pubDate>Wed, 14 Oct 2020 23:29:17 +0000</pubDate><guid>https://www.sivalabs.in/blog/philip-testing-spring-boot-applications-masterclass-course-review/</guid><description>&lt;p&gt;If you ever worked on a large project which doesn&amp;rsquo;t have any tests then you know how painful it is to work on such codebase.&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;You know what is more painful? Working on a project which has plenty of USELESS tests written for the sake of passing minimum code coverage requirement.&lt;/p&gt;

 &lt;/blockquote&gt;</description></item><item><title>LocalStack Spring Boot Starter Tutorial</title><link>https://www.sivalabs.in/blog/localstack-spring-boot-starter-tutorial/</link><pubDate>Tue, 15 Sep 2020 23:29:17 +0000</pubDate><guid>https://www.sivalabs.in/blog/localstack-spring-boot-starter-tutorial/</guid><description>&lt;p&gt;I was working on a Spring Boot application which is planned to deploy on AWS and, we were using S3, SQS and RDS services.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/localstack/localstack"&gt;LocalStack&lt;/a&gt; provides an easy-to-use test/mocking framework
for developing AWS based Cloud applications.&lt;/p&gt;</description></item><item><title>All the resources you ever need as a Java &amp; Spring application developer</title><link>https://www.sivalabs.in/blog/all-the-resources-you-ever-need-as-a-java-spring-application-developer/</link><pubDate>Sun, 13 Sep 2020 23:29:17 +0000</pubDate><guid>https://www.sivalabs.in/blog/all-the-resources-you-ever-need-as-a-java-spring-application-developer/</guid><description>&lt;p&gt;Nowadays software development is a challenging task as the number of programming languages, frameworks, libraries are increasing rapidly day by day.
Luckily, the number of resources to learn on the internet for free also increased a lot. There are a ton of free resources to learn almost everything on the internet.
There are lots of official documentation, blog posts, Udemy courses, YouTube videos etc.&lt;/p&gt;</description></item><item><title>Testing Spring Boot Applications</title><link>https://www.sivalabs.in/blog/spring-boot-testing/</link><pubDate>Mon, 07 Oct 2019 02:29:17 +0000</pubDate><guid>https://www.sivalabs.in/blog/spring-boot-testing/</guid><description>&lt;p&gt;&lt;strong&gt;Spring Boot&lt;/strong&gt; is the most popular tech stack for building Java-based REST APIs.
In this tutorial, we will learn how to write tests for Spring Boot applications.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create Spring Boot Application&lt;/li&gt;
&lt;li&gt;Unit Testing using &lt;a href="https://junit.org/junit5/docs/current/user-guide/"&gt;JUnit 5&lt;/a&gt; and &lt;a href="https://site.mockito.org/"&gt;Mockito&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Integration Testing using &lt;a href="https://www.testcontainers.org/"&gt;TestContainers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Testing MicroService Integrations using &lt;a href="http://www.mock-server.com/"&gt;MockServer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Kafka Tutorial - Producer and Consumer using Spring Boot</title><link>https://www.sivalabs.in/blog/kafka-tutorial-producer-consumer-using-spring-boot/</link><pubDate>Mon, 24 Jun 2019 02:29:17 +0000</pubDate><guid>https://www.sivalabs.in/blog/kafka-tutorial-producer-consumer-using-spring-boot/</guid><description>&lt;p&gt;In the previous post &lt;a href="https://www.sivalabs.in/blog/kafka-tutorial-java-producer-consumer/"&gt;Kafka Tutorial - Java Producer and Consumer&lt;/a&gt;, we learned how to implement a Producer and Consumer for a Kafka topic using the plain Java Client API.&lt;/p&gt;
&lt;p&gt;In this post, we are going to look at how to use Spring for Kafka, which provides a high-level abstraction over the Kafka Java Client API to make it easier to work with Kafka.&lt;/p&gt;</description></item><item><title>Spring Cloud Tutorials – Auto Refresh Config Changes using Spring Cloud Bus</title><link>https://www.sivalabs.in/blog/spring-cloud-tutorials-auto-refresh-config-changes-using-spring-cloud-bus/</link><pubDate>Mon, 14 Aug 2017 12:30:43 +0000</pubDate><guid>https://www.sivalabs.in/blog/spring-cloud-tutorials-auto-refresh-config-changes-using-spring-cloud-bus/</guid><description>&lt;p&gt;In the previous article, &lt;a href="https://www.sivalabs.in/blog/spring-cloud-tutorials-introduction-to-spring-cloud-config-server/"&gt;Introduction to Spring Cloud Config Server&lt;/a&gt;, we have seen how to use Spring Cloud Config Server.&lt;/p&gt;
&lt;p&gt;But the problem is that to reload the config changes in Config Client applications, we need to trigger the &lt;strong&gt;/refresh&lt;/strong&gt; endpoint manually. This is not practical or viable if you have a large number of applications.&lt;/p&gt;</description></item><item><title>Spring Cloud Tutorials – Introduction to Spring Cloud Config Server</title><link>https://www.sivalabs.in/blog/spring-cloud-tutorials-introduction-to-spring-cloud-config-server/</link><pubDate>Mon, 14 Aug 2017 03:35:07 +0000</pubDate><guid>https://www.sivalabs.in/blog/spring-cloud-tutorials-introduction-to-spring-cloud-config-server/</guid><description>&lt;p&gt;Spring Boot provides a lot of flexibility in externalizing configuration properties via properties or YAML files. We can also configure properties for each environment (dev, qa, prod, etc.) separately using profile-specific configuration files such as &lt;strong&gt;application.properties&lt;/strong&gt;, &lt;strong&gt;application-dev.properties&lt;/strong&gt;, &lt;strong&gt;application-prod.properties&lt;/strong&gt;, etc. But once the application is started, we cannot update the properties at runtime. If we change the properties, we need to restart the application to use the updated configuration properties.&lt;/p&gt;</description></item><item><title>Retrying Method Execution using Spring AOP</title><link>https://www.sivalabs.in/blog/retrying-method-execution-using-spring-aop/</link><pubDate>Tue, 05 Jan 2016 15:40:36 +0000</pubDate><guid>https://www.sivalabs.in/blog/retrying-method-execution-using-spring-aop/</guid><description>&lt;p&gt;One of my blog followers sent an email asking me to show an example of &lt;strong&gt;&amp;ldquo;Real-World Usage of Spring AOP&amp;rdquo;&lt;/strong&gt;. He mentioned that in most examples, the usage of &lt;strong&gt;Spring AOP&lt;/strong&gt; is demonstrated for &lt;strong&gt;logging method entry/exit&lt;/strong&gt;, &lt;strong&gt;Transaction management&lt;/strong&gt;, or &lt;strong&gt;Security checks&lt;/strong&gt;. He wanted to know how Spring AOP is being used in &lt;strong&gt;&amp;ldquo;Real Projects for Real Problems&amp;rdquo;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;So I would like to show how I have used Spring AOP in one of my projects to handle a real problem.&lt;/p&gt;</description></item><item><title>A Developers Perspective on Spring vs JavaEE</title><link>https://www.sivalabs.in/blog/a-developers-perspective-on-spring-vs-javaee/</link><pubDate>Mon, 15 Jun 2015 13:04:00 +0000</pubDate><guid>https://www.sivalabs.in/blog/a-developers-perspective-on-spring-vs-javaee/</guid><description>&lt;p&gt;In the Java community, Spring vs. JavaEE is a never-ending debate. In such debates, people form two groups consisting of evangelists, architects, and hardcore fans of one platform and debate endlessly. Those who participate in the debates may be architects who are responsible for platform selection. But what would developers think about this Spring vs. JavaEE debate?&lt;/p&gt;
&lt;p&gt;I am a Java developer who uses both Spring and JavaEE, and I am not part of the Spring or JavaEE fan club. Here, I would like to share my own thoughts on this epic Spring vs. JavaEE debate.&lt;/p&gt;</description></item><item><title>A bunch of Maven Archetypes for Spring based Projects</title><link>https://www.sivalabs.in/blog/a-bunch-of-maven-archetypes-for-spring-based-projects/</link><pubDate>Mon, 29 Oct 2012 12:18:00 +0000</pubDate><guid>https://www.sivalabs.in/blog/a-bunch-of-maven-archetypes-for-spring-based-projects/</guid><description>&lt;p&gt;Maven is a good project management tool that greatly reduces the amount of time we spend creating Java projects with a proper structure. With so many predefined Maven archetypes, it is even easier to create projects by simply selecting the archetype based on the technologies we need and the type (jar/war/ear) of project we want to create.&lt;/p&gt;
&lt;p&gt;However, sometimes those predefined archetypes&amp;rsquo; structures may not suit our needs well, or we may need some more additions to the pre-configured dependencies/frameworks, etc.&lt;/p&gt;</description></item><item><title>MyBatis Tutorial : Part4 – Spring Integration</title><link>https://www.sivalabs.in/blog/mybatis-tutorial-part4-spring-integration/</link><pubDate>Wed, 24 Oct 2012 00:40:00 +0000</pubDate><guid>https://www.sivalabs.in/blog/mybatis-tutorial-part4-spring-integration/</guid><description>&lt;p&gt;&lt;a href="https://www.sivalabs.in/blog/mybatis-tutorial-part1-crud-operations/"&gt;&lt;strong&gt;MyBatis Tutorial: Part1 – CRUD Operations&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.sivalabs.in/blog/mybatis-tutorial-part-2-crud-operations-using-annotations/"&gt;&lt;strong&gt;MyBatis Tutorial: Part-2: CRUD operations Using Annotations&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.sivalabs.in/blog/mybatis-tutorial-part-3-mapping-relationships/"&gt;&lt;strong&gt;MyBatis Tutorial: Part 3 – Mapping Relationships&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.sivalabs.in/blog/mybatis-tutorial-part4-spring-integration/"&gt;&lt;strong&gt;MyBatis Tutorial : Part4 – Spring Integration&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;MyBatis-Spring is a sub-project of MyBatis that provides Spring integration support, which drastically simplifies MyBatis usage. For those who are familiar with Spring&amp;rsquo;s Dependency Injection process, using MyBatis-Spring is very simple.&lt;/p&gt;
&lt;p&gt;First, let us see the process of using MyBatis without Spring.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create SqlSessionFactory using SqlSessionFactoryBuilder by passing mybatis-config.xml, which contains DataSource properties, a list of Mapper XMLs, TypeAliases, etc.&lt;/li&gt;
&lt;li&gt;Create an SqlSession object from SqlSessionFactory.&lt;/li&gt;
&lt;li&gt;Get a Mapper instance from SqlSession and execute queries.&lt;/li&gt;
&lt;li&gt;Commit or roll back the transaction using the SqlSession object.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;With MyBatis-Spring, most of the above steps can be configured in the Spring ApplicationContext, and SqlSession or Mapper instances can be injected into Spring Beans. Then we can use Spring&amp;rsquo;s TransactionManagement features without writing transaction commit/rollback code all over the place.&lt;/p&gt;</description></item></channel></rss>