Skip to content
Advertisement

Tag: spring

Spring Boot URL mapping not working when files are present in multiple packages

I tried making a simple REST API using Spring Boot. I have put the classes in separate packages. In this case, the URL mapping is not working (checked using Postman), whereas its working fine if I put them all in the same package as that of the main class. “”” Hierarchy of the packages : com.example.ProductCRUD |—–ProductCrudApplication.java (main) com.example.ProductCRUD.Controller |—–ProductController.java(controller)

How adap Sleuth headers to make them compatible with OpenTracing

I’m working on a big stack of micro services written in Spring Boot, those services are using spring-cloud-starter-sleuth in order to trace the calls between several services. My concern is that I have implemented a new service based on Quarkus and the quarkus-smallrye-opentracing doesn’t recognize header sent by Sleuth. I cannot modify the existing services using Sleuth and so I’m

Implement Search specification for pagination

I implemented this Page request: The question is how to implement search functionality for this Page request? I would like to send params like type and dateAdded into GET params and return filtered result? Answer There are two ways to achieve this: Examples. Simple but can only be used for simple searches To be able to search by example, you

Cant run my spring application on ubuntu with jdk11

Pls, help. Can’t run my application on ubuntu 18.04.5 Java version: openjdk 11.0.10 2021-01-19 Apache Maven 3.6.0 Maven home: /usr/share/maven Java version: 11.0.10, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64 Default locale: en_US, platform encoding: UTF-8 OS name: “linux”, version: “5.4.0-66-generic”, arch: “amd64”, family: “unix” There is app output: pom.xml: UserService.java RegistarionCotroller.java WebSecurityConfig.java Answer When initializing the WebSecurityConfig, Spring Container will attempt to

Advertisement