I am trying to configure my spring boot application to use h2 console. I found some articles and all of them use webServlet. But I can not import the class although I have h2 dependency added in my pom.xml. I get this error message can not resolve the symbol WebServlet. My import line Below is my pom.xml and my application.properties
Tag: spring-boot
Unmarshalling query params into object using Swagger/Springfox and Spring Boot
I’ve got a search endpoint in my REST service. I’m using Spring Boot, so I’ve got a @RestController setup with a method that returns search results based on a search query. This is the method definition: I was hoping that SwaggerUI would show the SearchQuery’s fields as separate query params in the ui. It doesn’t; it just shows a generic
Spring Boot control target JAR file name
My Spring Boot project has build description: org.apache.maven.plugins <artifactId&…
Change the port of a Spring boot application without changing the code
I have two applications that I need to run simultaneously, and both are trying to run on port 8080. I’d like to change one of them to port 9000. The application I’m trying to change has spring security, so it runs on port 8443 when using https and port 8080 when using http. I have to move it from port
spring-boot – turn off console logging
Want to configure a spring-boot (1.3.5) application to send log-output only to a file — turn off the console. It looks very easy, according to the docs: howto-logging.html — section ยง 72.1.1 Configure logback for file only output But I just cannot get this to work — it still logs both to file and console, whatever I try. Been googling
Spring: overriding one application.property from command line
I have an application.properties file with default variable values. I want to be able to change ONE of them upon running with mvn spring-boot:run. I found how to change the whole file, but I only want to change one or two of these properties. Answer You can pass in individual properties as command-line arguments. For example, if you wanted to
Rest Controller not recognizing GET request in Spring Boot App
I am trying to implement simple demo MVC app with Spring Boot but I get 404 error while executing the application. The uri is `http://localhost:8080/’ which is to display all the rows in a table called circle. Spring Boot : 1.3.3.RELEASE Java Version : 1.8.0_65 Database : Apache Derby 10.12.1.1 Maven Java Project: Application.java CircleController.java CircleRepository.java CircleService.java Circle.java application.properties pom.xml
Thymeleaf Neither BindingResult nor plain target object for bean name ‘person’ available as request attribute
From what I can tell this is set up correctly but I am getting the following error: Form Person.java Controller I looked at Spring-boot and Thmeleaf setup and it looks like my setup is identical. ——————— Update 1 ———————– I have changed my post method to include BindingResult with no success. Answer You forgot to add BindingResult after your @ModelAttribute
Is it possible to validate a firebase token (JWT) from server (Java)
Browser Client – Uses Firebase to sign in and has the firebase userid, token in the local storage. When the browser calls the server – a REST API end point , the token is passed as a Request header. Now, the server is configured with a Firebase Secret. My question: is it possible to validate the firebase issued token at
Maven spring boot run debug with arguments
Usually I’m running my Spring Boot application with command: I want to set custom port to debug, so I can connect from eclipse. When I add arguments from example https://docs.spring.io/spring-boot/docs/1.1.2.RELEASE/maven-plugin/examples/run-debug.html it works but other arguments like server.port or path.to.config.dir are no longer recognized and I get exception like: Question: How I can run with all arguments? Answer The behavior and