Closed
Description
i am getting this error
org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [microsoft.sql.DateTimeOffset] to type [java.time.Instant]
CREATE TABLE [user]
(
id BIGINT IDENTITY (1,1) NOT NULL PRIMARY KEY,
created DATETIMEOFFSET(6) DEFAULT SYSDATETIMEOFFSET()
);
import java.time.Instant;
import org.springframework.data.annotation.Id;
import lombok.Data;
@Data
public class User {
@Id
private Long id;
private Instant created = Instant.now();
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-docker-compose'
runtimeOnly 'com.microsoft.sqlserver:mssql-jdbc'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation 'org.springframework.boot:spring-boot-testcontainers'
testImplementation 'org.testcontainers:junit-jupiter'
testImplementation 'org.testcontainers:mssqlserver'
}
is it a bug