Skip to content
Advertisement

Tag: spring-boot

How to disable Google Cloud Platform integration?

I have these two dependencies in my POM file: I’d like to disable these GCP features in certain profiles. I need to test my app locally but GCP keeps getting in the way. Answer Spring depends on auto-configuration when setting up the application. In many cases, it scans the classpath for certain dependencies, and if they are present, auto-configuration is

flyway schema giving IllegalArgumentException

On running flyway schema I’m receiving this exception.using Java 8 with spring boot. Flyway is not able to initialize. Answer Check the flyway_schema_history table, there you will see that you have an entry with installed_rank value set to 0, delete the row and run your application again. This will sort the issue out.

How to get only one role from a set of roles

I’m trying to implement a simple spring security project where basically I have user and role entities. I have a set of roles “ADMIN” and “USER”. Now I want to assign only “USER” role along with creating a new user. I have tried to use List and collections with the same problem. The User entity has Set<Role> And Role entity:

Spring Cloud Gateway for composite API calls?

I am starting to build a Microservice API Gateway, and I am considering Spring Cloud to help me with the routing. But some calls to the Gateway API will need multiple requests to different services. Lets say I have 2 services: Order Details Service and Delivery Service. I want to have a Gateway endpoint GET /orders/{orderId} that makes a call

How to apply the PathPatternParser introduced in Spring 5?

I want to create a GET request that takes a filepath as a path variable. As described in the Spring documentation found here, this should be possible by using the following: /resources/{*path}. I am using Spring Boot 2.1.2 which uses Spring 5. However when I set up my controller method like this, the request doesn’t match the route. An expected

Advertisement