Skip to content

Commit da732ab

Browse files
committed
Update JDBC examples to work with newer H2 versions.
See #636
1 parent 345b38c commit da732ab

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

jdbc/immutables/src/main/java/example/springdata/jdbc/immutables/Application.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import org.springframework.boot.autoconfigure.SpringBootApplication;
2121
import org.springframework.context.annotation.Configuration;
22+
import org.springframework.context.annotation.Lazy;
2223
import org.springframework.core.io.ResourceLoader;
2324
import org.springframework.data.jdbc.core.convert.BasicJdbcConverter;
2425
import org.springframework.data.jdbc.core.convert.DefaultJdbcTypeFactory;
@@ -73,7 +74,7 @@ public ImmutablesJdbcConfiguration(ResourceLoader resourceLoader) {
7374
*/
7475
@Override
7576
public JdbcConverter jdbcConverter(JdbcMappingContext mappingContext, NamedParameterJdbcOperations operations,
76-
RelationResolver relationResolver, JdbcCustomConversions conversions, Dialect dialect) {
77+
@Lazy RelationResolver relationResolver, JdbcCustomConversions conversions, Dialect dialect) {
7778

7879
var jdbcTypeFactory = new DefaultJdbcTypeFactory(operations.getJdbcOperations());
7980

jdbc/jooq/pom.xml

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
<name>Spring Data JDBC - Usage with jOOQ</name>
1515
<description>Sample project demonstrating Spring Data JDBC features</description>
1616

17+
<properties>
18+
<jooq.version>3.16.6</jooq.version>
19+
</properties>
20+
1721
<dependencies>
1822
<dependency>
1923
<groupId>org.jooq</groupId>
+10-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
CREATE TABLE IF NOT EXISTS category (
2-
id INTEGER IDENTITY PRIMARY KEY,
3-
name VARCHAR(100),
2+
id
3+
INTEGER
4+
AUTO_INCREMENT
5+
PRIMARY
6+
KEY,
7+
name
8+
VARCHAR
9+
(
10+
100
11+
),
412
description VARCHAR(2000),
513
age_group VARCHAR(20)
614
);

0 commit comments

Comments
 (0)