Relative Content

Tag Archive for javaspringspring-bootspring-mvc

SpringMVC accept form data

@NoArg data class User( var username: String, var password: String, // … ) // bean public class User { private int id; private String firstname; private String lastname; private String username; private String password; private String email; // … @Override public String toString() { return “User{” + “id=” + id + “, firstname='” + firstname […]

SpringMVC accept form data

@NoArg data class User( var username: String, var password: String, // … ) // bean public class User { private int id; private String firstname; private String lastname; private String username; private String password; private String email; // … @Override public String toString() { return “User{” + “id=” + id + “, firstname='” + firstname […]

SpringMVC accept form data

@NoArg data class User( var username: String, var password: String, // … ) // bean public class User { private int id; private String firstname; private String lastname; private String username; private String password; private String email; // … @Override public String toString() { return “User{” + “id=” + id + “, firstname='” + firstname […]

Im getting a build error in my spring boot application when trying to build on new machine

When trying to compile my spring boot application i get the following, been at it online looking for a solution so any help is appreciated. It works fine on the original machine i started building this on but now im on a new machine and get this error. I copied over all my applications. props over and not really seeing why is not compiling anymore. If you need more info ill get it to you asap. Thanks!

AnnotationConfigServletWebServerApplicationContext has not been refreshed yet

I have a Spring MVC application which uses a dependency library which initialises some Beans lazily. But those lazy beans are required during startup for initialising some other Beans. So, when those lazy beans(‘db_client’ is one of them) are being initialised, the application startup fails by throwing below error

My application frontend does not open when I use intellij only when I use eclipse

I have a legacy application that was migrated to SpringBoot and when I run it through Eclipse without configuring anything different it runs and when I access my http://localhost:8080 it opens normally but when I run it through IntelliJ it does not open the front end and there are no errors in the log. When calling the endpoints the back end works but not the front end.
The structure where the HTML is located is this src/main/webapp/pages
I tried this configuration in the properties
spring.mvc.static-path-pattern=/pages/**
spring.resources.static-locations=classpath:/webapp/pages/,file:src/main/webapp/pages/
without success
I tried to create a configuration class and also without success
Does anyone know of another path that I can try?