Skip to content
Advertisement

Tag: spring-boot

Cannot import org.h2.server.web.WebServlet

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

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

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

Advertisement