@ -127,7 +127,7 @@ The Spring Data JDBC repositories support can be activated by an annotation thro
@@ -127,7 +127,7 @@ The Spring Data JDBC repositories support can be activated by an annotation thro
class ApplicationConfig extends AbstractJdbcConfiguration { // <2>
@Bean
public DataSource dataSource() { // <3>
DataSource dataSource() { // <3>
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
@ -250,13 +250,11 @@ Custom converters can be registered, for types that are not supported by default
@@ -250,13 +250,11 @@ Custom converters can be registered, for types that are not supported by default
[source,java]
----
@Configuration
public class DataJdbcConfiguration extends AbstractJdbcConfiguration {
class DataJdbcConfiguration extends AbstractJdbcConfiguration {
@Override
public JdbcCustomConversions jdbcCustomConversions() {
return new JdbcCustomConversions(Collections.singletonList(TimestampTzToDateConverter.INSTANCE));
}
@ReadingConverter
@ -303,7 +301,7 @@ The following example maps the `MyEntity` class to the `CUSTOM_TABLE_NAME` table
@@ -303,7 +301,7 @@ The following example maps the `MyEntity` class to the `CUSTOM_TABLE_NAME` table
[source,java]
----
@Table("CUSTOM_TABLE_NAME")
public class MyEntity {
class MyEntity {
@Id
Integer id;
@ -322,7 +320,7 @@ The following example maps the `name` property of the `MyEntity` class to the `C
@@ -322,7 +320,7 @@ The following example maps the `name` property of the `MyEntity` class to the `C
====
[source,java]
----
public class MyEntity {
class MyEntity {
@Id
Integer id;
@ -340,7 +338,7 @@ In the following example the corresponding table for the `MySubEntity` class has
@@ -340,7 +338,7 @@ In the following example the corresponding table for the `MySubEntity` class has
====
[source,java]
----
public class MyEntity {
class MyEntity {
@Id
Integer id;
@ -348,7 +346,7 @@ public class MyEntity {
@@ -348,7 +346,7 @@ public class MyEntity {
Set<MySubEntity> subEntities;
}
public class MySubEntity {
class MySubEntity {
String name;
}
----
@ -360,7 +358,7 @@ This additional column name may be customized with the `keyColumn` Element of th
@@ -360,7 +358,7 @@ This additional column name may be customized with the `keyColumn` Element of th
====
[source,java]
----
public class MyEntity {
class MyEntity {
@Id
Integer id;
@ -368,7 +366,7 @@ public class MyEntity {
@@ -368,7 +366,7 @@ public class MyEntity {
List<MySubEntity> name;
}
public class MySubEntity {
class MySubEntity {
String name;
}
----
@ -388,7 +386,7 @@ Opposite to this behavior `USE_EMPTY` tries to create a new instance using eithe
@@ -388,7 +386,7 @@ Opposite to this behavior `USE_EMPTY` tries to create a new instance using eithe
====
[source,java]
----
public class MyEntity {
class MyEntity {
@Id
Integer id;
@ -397,7 +395,7 @@ public class MyEntity {
@@ -397,7 +395,7 @@ public class MyEntity {
EmbeddedEntity embeddedEntity;
}
public class EmbeddedEntity {
class EmbeddedEntity {
String name;
}
----
@ -414,7 +412,7 @@ Make use of the shortcuts `@Embedded.Nullable` & `@Embedded.Empty` for `@Embedde
@@ -414,7 +412,7 @@ Make use of the shortcuts `@Embedded.Nullable` & `@Embedded.Empty` for `@Embedde
[source,java]
----
public class MyEntity {
class MyEntity {
@Id
Integer id;
@ -610,7 +608,7 @@ The following example shows how to use `@Query` to declare a query method:
@@ -610,7 +608,7 @@ The following example shows how to use `@Query` to declare a query method:
====
[source,java]
----
public interface UserRepository extends CrudRepository<User, Long> {
@Query("select firstName, lastName from User u where u.emailAddress = :email")
User findByEmailAddress(@Param("email") String email);
@ -828,7 +826,7 @@ For example, the following listener gets invoked before an aggregate gets saved:
@@ -828,7 +826,7 @@ For example, the following listener gets invoked before an aggregate gets saved:
[source,java]
----
@Bean
public ApplicationListener<BeforeSaveEvent<Object>> loggingSaves() {
@ -845,7 +843,7 @@ Callback methods will only get invoked for events related to the domain type and
@@ -845,7 +843,7 @@ Callback methods will only get invoked for events related to the domain type and
====
[source,java]
----
public class PersonLoadListener extends AbstractRelationalEventListener<Person> {
class PersonLoadListener extends AbstractRelationalEventListener<Person> {
@ -937,11 +935,11 @@ If you need to tweak transaction configuration for one of the methods declared i
@@ -937,11 +935,11 @@ If you need to tweak transaction configuration for one of the methods declared i
====
[source,java]
----
public interface UserRepository extends CrudRepository<User, Long> {
@ -959,7 +957,7 @@ The following example shows how to create such a facade:
@@ -959,7 +957,7 @@ The following example shows how to create such a facade:
[source,java]
----
@Service
class UserManagementImpl implements UserManagement {
public class UserManagementImpl implements UserManagement {
private final UserRepository userRepository;
private final RoleRepository roleRepository;
@ -999,7 +997,7 @@ To let your query methods be transactional, use `@Transactional` at the reposito
@@ -999,7 +997,7 @@ To let your query methods be transactional, use `@Transactional` at the reposito
[source,java]
----
@Transactional(readOnly = true)
public interface UserRepository extends CrudRepository<User, Long> {
@ -1035,7 +1033,7 @@ In order to activate auditing, add `@EnableJdbcAuditing` to your configuration,
@@ -1035,7 +1033,7 @@ In order to activate auditing, add `@EnableJdbcAuditing` to your configuration,
class Config {
@Bean
public AuditorAware<AuditableUser> auditorProvider() {