I have this example of entity: and this example of repo: But when I need to do: I cant get creationDate anymore from: Because some people are changing the time from OS, and the time of the creation are being persisted wrong. so I need some: To set the creationDate from user. Do I need a new repo to get
Tag: spring
Spring deserializes a LocalDate in a @RequestBody differently from one in a @RequestParam – why, and can they be the same?
QUESTION: Spring appears to use different deserialization methods for LocalDate depending on whether it appears in a @RequestBody or a request @ReqestParam – is this correct, and if so, is there a way to configure them to be the same throughout an application? BACKGROUND: In my @RestController, I have two methods – one GET, and one POST. The GET expects
Static variable set to null by @Value
My Constants File: @Component public class Constants { public static String ROOT_DOMAIN; @Value(“${setting.rootDomain}”) private void setRootDomain(String rootDomain) { …
Send invites with google calendar API
I have a Java Spring API where I want to integrate Google Calendar. The task: Basically creating an event for two attendees (users) and send them an invite with the option to accept/decline (…
Spring Boot application in eclipse, the Tomcat connector configured to listen on port XXXX failed to start
I’m developing a REST API using Spring Framework. First I wasn’t able to run my application because of the same problem. The port 8080 on my computer is busy. Then I found out that one alternative to solve this problem is creating an application.properties file under src/main/resources folder. That’s what I made, and set up the server to listen on
How to log time taken by Rest web service in Spring Boot?
I am writing a web Rest web service using Spring Boot. I want to log time taken by my webservice to process request. Also I want to log headers,method and URI called. I have done similar in my …
Gradle project error – java.lang.ClassNotFoundException: org.springframework.boot.SpringApplication
This is my main application code: package u.d.dip.rs.app; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org….
Spring and JMS DynamicDestinationResolution
I am using the latest Spring 4 and ActiveMQ to put JMS messages on a queue. Using the JMSTemplate, I have a default queue, and the sample code I have lets me put a message on the default queue with …
Spring boot application won’t run when trying to run from the jar file
I have a spring boot application which works fine when run through intellij. But when I run it from the jar I am getting the below exception. 2017-02-13 05:18:28.596 WARN 8581 — [ …
ConfigurationProperties does not bind properties
I want to bind my application.properties into a class automatically by using @ConfigurationProperties annotation. First, I tried with @Value annotation and was able to inject property values into class variables. However, @ConfigurationProperties did not inject properties into values. my application.properties: application.java ConfigBinder.java output: What is the wrong with this implementation? edit and solution: possible duplication: Spring Boot @ConfigurationProperties not retrieving