Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b915038

Browse files
committed
#368 - Polishing.
Line breaks after dots in ascii doctor file for easier reading of the source files. Adds specific deprecation links instead of just links to the general package. Removes an unused private method in `ConnectionFactoryUtils`
1 parent 7707b4f commit b915038

40 files changed

+43
-52
lines changed

‎src/main/asciidoc/reference/r2dbc-upgrading.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ Spring Data R2DBC was developed with the intent to evaluate how well R2DBC can i
1111
One of the main aspects was to move core support into Spring Framework once R2DBC support has proven useful.
1212
Spring Framework 5.3 ships with a new module: Spring R2DBC.
1313

14-
`spring-r2dbc` ships core R2DBC functionality (a slim variant of `DatabaseClient`, Transaction Manager, Connection Factory initialization, Exception translation) that was initially provided by Spring Data R2DBC. The 1.2.0 release aligns with what's provided in Spring R2DBC by making several changes outlined in the following sections.
14+
`spring-r2dbc` ships core R2DBC functionality (a slim variant of `DatabaseClient`, Transaction Manager, Connection Factory initialization, Exception translation) that was initially provided by Spring Data R2DBC.
15+
The 1.2.0 release aligns with what's provided in Spring R2DBC by making several changes outlined in the following sections.
1516

1617
Spring R2DBC's `DatabaseClient` is a more lightweight implementation that encapsulates a pure SQL-oriented interface.
1718
You will notice that the method to run SQL statements changed from `DatabaseClient.execute(...)` to `DatabaseClient.sql(...)`.
@@ -36,7 +37,8 @@ Spring R2DBC provides a slim exception translation variant without an SPI for no
3637
[[upgrading.1.1-1.2.replacements]]
3738
=== Usage of replacements provided by Spring R2DBC
3839

39-
To ease migration, several deprecated types are now subtypes of their replacements provided by Spring R2DBC. Spring Data R2DBC has changes several methods or introduced new methods accepting Spring R2DBC types.
40+
To ease migration, several deprecated types are now subtypes of their replacements provided by Spring R2DBC.
41+
Spring Data R2DBC has changes several methods or introduced new methods accepting Spring R2DBC types.
4042
Specifically the following classes are affected:
4143

4244
* `R2dbcEntityTemplate`

‎src/main/java/org/springframework/data/r2dbc/connectionfactory/ConnectionFactoryUtils.java

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
*
3737
* @author Mark Paluch
3838
* @author Christoph Strobl
39-
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection} instead.
39+
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection.ConnectionFactoryUtils} instead.
4040
*/
4141
@Deprecated
4242
public abstract class ConnectionFactoryUtils {
@@ -82,21 +82,6 @@ public static Mono<Connection> doGetConnection(ConnectionFactory connectionFacto
8282
return org.springframework.r2dbc.connection.ConnectionFactoryUtils.doGetConnection(connectionFactory);
8383
}
8484

85-
/**
86-
* Actually fetch a {@link io.r2dbc.spi.Connection} from the given {@link io.r2dbc.spi.ConnectionFactory}, defensively
87-
* turning an unexpected {@literal null} return value from {@link io.r2dbc.spi.ConnectionFactory#create()} into an
88-
* {@link IllegalStateException}.
89-
*
90-
* @param connectionFactory the {@link io.r2dbc.spi.ConnectionFactory} to obtain {@link io.r2dbc.spi.Connection}s from
91-
* @return a R2DBC {@link io.r2dbc.spi.Connection} from the given {@link io.r2dbc.spi.ConnectionFactory} (never
92-
* {@literal null}).
93-
* @throws IllegalStateException if the {@link io.r2dbc.spi.ConnectionFactory} returned a {@literal null} value.
94-
* @see ConnectionFactory#create()
95-
*/
96-
private static Mono<Connection> fetchConnection(ConnectionFactory connectionFactory) {
97-
return Mono.from(connectionFactory.create());
98-
}
99-
10085
/**
10186
* Close the given {@link io.r2dbc.spi.Connection}, obtained from the given {@link io.r2dbc.spi.ConnectionFactory}, if
10287
* it is not managed externally (that is, not bound to the thread).

‎src/main/java/org/springframework/data/r2dbc/connectionfactory/ConnectionHolder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* @author Christoph Strobl
3434
* @see R2dbcTransactionManager
3535
* @see ConnectionFactoryUtils
36-
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection} instead.
36+
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection.ConnectionHolder} instead.
3737
*/
3838
@Deprecated
3939
public class ConnectionHolder extends ResourceHolderSupport {

‎src/main/java/org/springframework/data/r2dbc/connectionfactory/DelegatingConnectionFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
*
3333
* @author Mark Paluch
3434
* @see #create
35-
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection} instead.
35+
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection.DelegatingConnectionFactory} instead.
3636
*/
3737
@Deprecated
3838
public class DelegatingConnectionFactory implements ConnectionFactory, Wrapped<ConnectionFactory> {

‎src/main/java/org/springframework/data/r2dbc/connectionfactory/SingleConnectionConnectionFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
* @see #create()
5454
* @see io.r2dbc.spi.Connection#close()
5555
* @see ConnectionFactoryUtils#releaseConnection(io.r2dbc.spi.Connection, ConnectionFactory)
56-
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection} instead.
56+
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection.SingleConnectionFactory} instead.
5757
*/
5858
@Deprecated
5959
public class SingleConnectionConnectionFactory extends DelegatingConnectionFactory

‎src/main/java/org/springframework/data/r2dbc/connectionfactory/TransactionAwareConnectionFactoryProxy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
* @see Connection#close
6161
* @see ConnectionFactoryUtils#doGetConnection
6262
* @see ConnectionFactoryUtils#doReleaseConnection
63-
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection} instead.
63+
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection.TransactionAwareConnectionFactoryProxy} instead.
6464
*/
6565
@Deprecated
6666
public class TransactionAwareConnectionFactoryProxy extends DelegatingConnectionFactory {

‎src/main/java/org/springframework/data/r2dbc/connectionfactory/init/CannotReadScriptException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* Thrown by {@link ScriptUtils} if an SQL script cannot be read.
2222
*
2323
* @author Mark Paluch
24-
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection.init} instead.
24+
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection.init.CannotReadScriptException} instead.
2525
*/
2626
@Deprecated
2727
public class CannotReadScriptException extends ScriptException {

‎src/main/java/org/springframework/data/r2dbc/connectionfactory/init/CompositeDatabasePopulator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* executing all scripts.
3232
*
3333
* @author Mark Paluch
34-
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection.init} instead.
34+
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection.init.CompositeDatabasePopulator} instead.
3535
*/
3636
@Deprecated
3737
public class CompositeDatabasePopulator implements DatabasePopulator {

‎src/main/java/org/springframework/data/r2dbc/connectionfactory/init/ConnectionFactoryInitializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @author Mark Paluch
3030
* @see DatabasePopulator
31-
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection.init} instead.
31+
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection.init.ConnectionFactoryInitializer} instead.
3232
*/
3333
@Deprecated
3434
public class ConnectionFactoryInitializer implements InitializingBean, DisposableBean {

‎src/main/java/org/springframework/data/r2dbc/connectionfactory/init/DatabasePopulator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* @see ResourceDatabasePopulator
2626
* @see DatabasePopulatorUtils
2727
* @see ConnectionFactoryInitializer
28-
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection.init} instead.
28+
* @deprecated since 1.2 in favor of Spring R2DBC. Use {@link org.springframework.r2dbc.connection.init.DatabasePopulator} instead.
2929
*/
3030
@FunctionalInterface
3131
@Deprecated

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /