Skip to content

Tag: spring-boot

Error while saving user to h2 using springboot

I’m trying to register a user entity through an API and add it to “users” table in my local dB. I keep getting the error mentioned below. I am sending a POST request with the following body: It states the “NULL not allowed for column “ID”” but I don’t understand…

Admin Process for 12-factor in Java

The 12-Factor blog suggests an App should ‘Run admin/management tasks as one-off processes’. What does that mean in the context of a Java/ Spring-boot application? Can I get an example. https://12factor.net/admin-processes Answer The site does not suggest this. It says that developers may want to …

Send data object using key

I want to create something like quick switch to send Java object based on Key. I tried this: Full code example: https://github.com/rcbandit111/Code_Switch_Select_POC/blob/main/src/main/java/org/poc/PocController.java Is it possible to use @Service(“first”) instead of @Component(“first”…

Java Spring Boot @Autowired values are null

When I try to print the variable that I have autowired, it prints “null” instead of the value I set it to, “Example.” I can’t quite figure out what I’m missing In my AppConfig class I have: In my other class, DAOMethods, that I want to autowire the variable in: Answer They …