Home » Archives for Stacktraceguru

Author Archives: Stacktraceguru

Stacktraceguru is an educational website. This website helps software programmers to learn and clarify concepts.

Docker introduction for beginners

This docker startup tutorial is designed for everyone who is interested to learn docker in a easy way. Main goal behind this tutorial is to make docker learning simple. As docker has simplified many things for software development, hence it is very important for everyone to know how to use docker in software development. In this blog we will cover ...

Read More »

Mockito when-then vs do-when

Writing unit test is very important for better software quality. For unit tests Mockito is one of the most common choices of developers. Mockito providers different way to mock methods, like do…when and when..then. Most of the time we face the question to use when-then vs do-when. We will see all the differences in detail. In Mockito we can mock ...

Read More »

Compile and run java9 module program: part2

In the previous post we saw baiscs about java 9 modules like, what is module, how to create module project, module descriptor file and so on. In this blog we will learn how to compile and run java9 module program. Recommended read: Java 9 module details: part 1 Java9 Module example for hello world Before going further let’s take an ...

Read More »

Java 9 Modules: part 1

In this blog we will go through one of the most important features of java 9, which is ‘Modules’ aka ‘Java Platform Module System (JPMS)’. We will understand everything about JPMS like, what is module? How it helps to add modules? and How to create and use module? Even if you don’t know anything about module don’t worry we got ...

Read More »

Run method on Spring Boot startup

spring-interview-questions-answers

While developing a spring boot application, sometimes we need to run a method or a piece of code at startup. This code can be anything ranging from, logging certain information to setting up database, cron jobs etc. We cannot just put this code in constructor, because required variables or servies may not be initialized yet. This could lead to null pointers or some ...

Read More »

Things that make Spring boot Awesome!

spring-interview-questions-answers

For every Java developer Hibernate, Spring are everyday terms. Although recently there was an addition to this list of ‘Spring-boot’. Nowadays Spring Boot is one of the most used open source frameworks. Hence if you are a java developer you must know about spring boot. In this tutorial we will cover srping boot features in detials. Spring-boot can be used ...

Read More »

Spring boot data JPA – Query for nested object

spring-interview-questions-answers

Nowadays spring boot and spring data are widely used frameworks. If you are building web application in java, spring boot is the first choice. If you have Database then spring data JPA is best choice. In spring boot spring data is the default implementation for database interaction. Spring boot using spring data JPA even creates nested object query from method ...

Read More »

Spring Boot Data JPA – beginner guide

spring-interview-questions-answers

Databases form an integral part of computer applications. With it comes considerable amount of database operations and the corresponding code. For huge applications which have large number of tables/entities, these operations or the code is repeated and duplicated to a large extent. Eventually a programmer would like to reduce this duplicate code. Spring framework took up the challenge and provided ...

Read More »

Different ways to remove Spaces from String In Java

String manipulation is done most often while programming. Like removing spaces in or around the string text. This also known as ‘strip’ping off spaces in the string. So up till now we are all aware of the different ways to remove spaces from string in java, namely trim, replaceAll. However, java 11 has made some new additions to these with methods like, strip, stripLeading , stripTrailing. Majority of the times, we ...

Read More »