Skip to content

Tag: spring

Spring Boot – Host JaCoCo coverage as static HTML

I am working with Spring Boot 2.2.5 and Java 8. I have a Spring Boot webservice that I deploy and run as a linux service using the embedded Tomcat in Spring Boot. During my Maven build, I generate code coverage metrics using the JaCoCo Maven plugin, and I would like to package and host these static HTML pages…

How validate an object using @Valid in Spring Boot?

I’m working on a Spring Boot project and I’m trying to validate some fields from an object. Actually I have an API which accepts parameters. I know I can use @Valid into API declaration like this: But I don’t want to validate there. I have a “filter” object to validate the values…

Spring Data JPA – Get all elements

I’m new to Spring Data JPA and I want to ask if there is a method that can be used to fetch all items, not by a certain criterion. Any help would be helpful. Answer Use the findAll method from repository Take a look here Spring Data JPA API Look here a small example that will fetch all MyObj objects