Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date returning null in controller #318

Closed
devesh1974 opened this issue Dec 23, 2023 · 0 comments
Closed

Date returning null in controller #318

devesh1974 opened this issue Dec 23, 2023 · 0 comments

Comments

@devesh1974
Copy link

Hi,

  I am using this dependency for spring boot 3 and date is returning null in controller with request.getAttribute or getter methods
org.springframework.boot spring-boot-starter-thymeleaf

My html is

Application Date
				<tr>
				<td><label for="expirydate">Expiry Date</label></td>
				<td><input type="date" th:field="*{expirydate}" required="required" placeholder="Expiry Date" class="form-control mb-4 col-4"></td>
				<td></td>
				</tr>

My pojo is this

@NotNull
@DateTimeFormat(pattern="MM/dd/yyyy")
@column(name="applicationdate")
private Date applicationdate ;

I am using Java 17

Please help.

Thanks in advance

Devesh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant