Spring Boot

Controller Testing

Controller testing checks that REST endpoints return the right status codes and JSON without starting a server or opening a browser. It is used to verify URL mapping, request-body conversion and response handling quickly and automatically. Spring’s MockMvc sends fake HTTP requests straight into the controller and lets you assert on the response. Only the […]

Controller Testing Read More »

Mockito

Mockito is a Java library that creates fake (mock) objects so a class can be tested on its own. It is used to isolate business logic: the service is tested without a real database or repository. A mock returns whatever you tell it to, so tests are fast, repeatable and need no MySQL. You can

Mockito Read More »

Unit Testing

Unit testing is a software testing technique used to verify individual components of an application independently from the rest of the system. In Spring Boot, JUnit 5 is commonly used to write and execute test cases, while Mockito is used to create mock objects for dependencies such as repositories. For example, a StudentService class may

Unit Testing Read More »

Testing Spring Boot Applications

DatabaseMetaData is a JDBC interface used to obtain information about the database, JDBC driver, tables, columns, and supported database features. It is obtained from a Connection object using the getMetaData() method. Using DatabaseMetaData, a Java program can dynamically inspect database information without directly querying system tables. This is useful for database administration, debugging, database migration

Testing Spring Boot Applications Read More »

Scheduled Tasks

Scheduled processing lets a Spring Boot application run a method automatically at fixed times or intervals, without any user request. You enable it with @EnableScheduling and mark a method with @Scheduled, and Spring runs it on a background thread. It is used for daily reports, data cleanup, sending reminders, syncing with other systems, and cache

Scheduled Tasks Read More »

PDF Export

PDF export converts application data into a fixed-layout document that looks the same on every device and prints cleanly.In Spring Boot, a PDF library (here OpenPDF) builds the document in memory as a byte[], and the controller returns it with the application/pdf content type.Unlike CSV or Excel, a PDF is meant for reading and printing,

PDF Export Read More »

Scroll to Top