Skip to content
Advertisement

Tag: spring

How does pathVar Attribute of @MatrixVariable annotation works in Spring?

I was reading regarding the @Matrixvariable annotation in Spring doc Spring Doc I have Understood this simple syntax // GET /pets/42;q=11;r=22 but having problem in understanding the below snippet What is this syntax @MatrixVariable(pathVar=”petId””) I haven’t understood the pathVar attribute of Matrixvariable annotation? This line is ok for me // matrixVars: [“q” : [11,22], “r” : 12, “s” : 23]

org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start. Build info: version: ‘unknown’, revision: ‘unknown’

While everything works on my machine, when I bring the project in which I’m working on my server, Selenium and Chromedriver won’t boot, causing the following exception Everything works like this: the user, for launching the crawler, is supposed to click a button. Then, with JavaScript, I make an Ajax call to a specific method of a specific class that

MappingJackson2HttpMessageConverter configuration is not being recognized in spring boot 2

I am working with spring for a while already and in my spring boot 1.5x’s projects always dealing with the LazyInitializationException with the next configuration (more downstairs) but now I am creating a new project with spring boot 2 and the same configuration is not being recognized further than WebMvcConfigurer now replace to the deprecated WebMvcConfigurerAdapter. My configuration: But after

What is the purpose of the Hibernate ReturningWork interface?

I am working on one JAVA + Hibernate project but currently, I saw one interface in my code (i.e. ReturningWork<Long>) which has one method called execute(java.sql.Connection). My question is what is the use of this ReturningWork interface? Answer As I explained in more details on my blog, you can use the ReturningWork and the Work interfaces to implement any logic

How to download an excel file in Spring RestController

I am using Apache POI to generate .xlsx file. I would like to return that file from Spring controller. Here’s what I’ve done so far: Controller: Is it possible to return actual excel file from rest controller so user can download it to his computer ? As for now controller returning byte[] but I would like to return it actual

Minimum Spring version compatible with Java 11

I need to upgrade an app to Java 11 very soon, I was wondering what’s the minimum Spring version that is compatible with Java 11. I’m currently using Java 8 and Spring 4.2.7. Answer From their task tracker — SPR-16391:Compatibility with JDK 11. The compatibility of JDK 10, 11 is planned along with 5.1 GA release. JDK 11 is currently

Advertisement