Skip to content
Advertisement

Cannot resolve org.springframework.boot:spring-boot-autoconfigure:2.6.1 springboot | dubbo

When I used maven to import the jar package of dubbo-spring-boot-start, the following error occurred: Springboot 2.6.1 and the dubbo-spring-boot-starter version is 2.7.3 Here is my pom.xml: What’s the reason? When I add the dubbo-spring-boot-starter jar package, I get an error, but it can run when I downgrade to 2.7.0 Answer Delete the .m2 folder then try again, I just

Redirect to another page with @RequestBody

I’m struggling with something. i pass JSON data to my controller In my RestController, i handle this information like this saving the JSON elements into the object myRequest. The thing is, having @RequestBody forces me to stay in that JSP, but i want to after processing this information, redirects to another page. Tried with various ways to redirect but the

How to arrange list item in spinner in ascending order

How to arrange items in list descending instead of the image: to be like this: and this is the below adapter I use: and this is the setupPrice() method which I need to arrange the entities in: Answer You can implement a Comparator like this for your Sm class before passing it into the adapter. Just like what the first

OpenAPI @RequestBody variables of type Map are not populated

I’ve a simple POST API where the @RequestBody contains a variable of type HashMap. The problem is that the variable “myMap” is never populated. Swagger UI shows the entry field correctly, with corresponding default values. I also added the a static block in the Configuration file, otherwise Swagger UI doesn’t show the entry field of type Map. What is needed

How to sort files in a stream by partial filename?

I use the following to sort files first by name, then by modification date: Question: how can I refactor the File::getName part to only compare based on partial filename, like: StringUtils.substringBefore(file.getName(), “_”)? Answer You could replace the method reference with a lambda expression on the File object, although you’ll have to specify the types (see the additional discussion here):

Advertisement