Skip to content
Advertisement

Tag: spring-mvc

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]

Can’t register an custom Entity in Spring project

Hello I have custom entity which has fields like name, description, date ant others, I created EventRepository and EventServiceImpl. Also i have a model RegisterEvent. Event entity: EventRepository: EventServiceImpl: RegisterEvent Model But when i Try to register event in my Html : I get the following error: And in the browser shows: I don’t know whats happening in the error

Cannot forward to error page for request … as the response has already been committed. As a result, the response may have the wrong status code

I am using Spring Boot 2.0.0.RELEASE, Thymeleaf, Spring Security, JDK 10, Apache Tomcat 9.0.6 . I have controller at application.properties I have I have configuration class When I access http://localhost:8081/cash/ccy or http://localhost:8081/cash/vy I see the same error … The full console log is https://gist.github.com/donhuvy/ad3f65955292d9874805c99c03f3227f#file-console-log-L450 How to fix it? Answer I am missing Thymeleaf dependency. I must add this line to

How to resolve SQLServerException: Invalid object name?

I am creating a spring boot application using MS SQL server. I have a requirement where I need to initialize USERS table in user_database database using data.sql file placed in /src/main/resources/ folder and rest of the tables should be created automatically in springboot_db database with the help of @Table annotation. Below is the code snippet. applicaiton.properties file data.sql AppConfiguration.java (One

Spring save locale and change locale when user logs in

I have a spring application that I want users to be able to change the preferred locale. Currently users can change the locale for the current session but I want to be able to save the users option so that whenever they log in, the saved locale is used if one exists. I have a mysql database which I’m using

Advertisement