Skip to content

Commit db3c7a1

Browse files
committed
Use consistently snippet tags
See spring-projectsgh-22171
1 parent d2e55a2 commit db3c7a1

File tree

10 files changed

+21
-21
lines changed

10 files changed

+21
-21
lines changed

framework-docs/modules/ROOT/pages/data-access/jdbc/connections.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,19 @@ To configure a `DriverManagerDataSource`:
4848

4949
The following example shows how to configure a `DriverManagerDataSource`:
5050

51-
include-code::./DriverManagerDataSourceConfiguration[tag=dataSourceBean,indent=0]
51+
include-code::./DriverManagerDataSourceConfiguration[tag=snippet,indent=0]
5252

5353
The next two examples show the basic connectivity and configuration for DBCP and C3P0.
5454
To learn about more options that help control the pooling features, see the product
5555
documentation for the respective connection pooling implementations.
5656

5757
The following example shows DBCP configuration:
5858

59-
include-code::./BasicDataSourceConfiguration[tag=dataSourceBean,indent=0]
59+
include-code::./BasicDataSourceConfiguration[tag=snippet,indent=0]
6060

6161
The following example shows C3P0 configuration:
6262

63-
include-code::./ComboPooledDataSourceConfiguration[tag=dataSourceBean,indent=0]
63+
include-code::./ComboPooledDataSourceConfiguration[tag=snippet,indent=0]
6464

6565
[[jdbc-DataSourceUtils]]
6666
== Using `DataSourceUtils`

framework-docs/src/main/java/org/springframework/docs/dataaccess/jdbc/jdbcdatasource/BasicDataSourceConfiguration.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
@Configuration
2525
class BasicDataSourceConfiguration {
2626

27-
// tag::dataSourceBean[]
27+
// tag::snippet[]
2828
@Bean(destroyMethod = "close")
2929
BasicDataSource dataSource() {
3030
BasicDataSource dataSource = new BasicDataSource();
@@ -34,6 +34,6 @@ BasicDataSource dataSource() {
3434
dataSource.setPassword("");
3535
return dataSource;
3636
}
37-
// end::dataSourceBean[]
37+
// end::snippet[]
3838

3939
}

framework-docs/src/main/java/org/springframework/docs/dataaccess/jdbc/jdbcdatasource/ComboPooledDataSourceConfiguration.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
@Configuration
2626
class ComboPooledDataSourceConfiguration {
2727

28-
// tag::dataSourceBean[]
28+
// tag::snippet[]
2929
@Bean(destroyMethod = "close")
3030
ComboPooledDataSource dataSource() throws PropertyVetoException {
3131
ComboPooledDataSource dataSource = new ComboPooledDataSource();
@@ -35,6 +35,6 @@ ComboPooledDataSource dataSource() throws PropertyVetoException {
3535
dataSource.setPassword("");
3636
return dataSource;
3737
}
38-
// end::dataSourceBean[]
38+
// end::snippet[]
3939

4040
}

framework-docs/src/main/java/org/springframework/docs/dataaccess/jdbc/jdbcdatasource/DriverManagerDataSourceConfiguration.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
@Configuration
2424
class DriverManagerDataSourceConfiguration {
2525

26-
// tag::dataSourceBean[]
26+
// tag::snippet[]
2727
@Bean
2828
DriverManagerDataSource dataSource() {
2929
DriverManagerDataSource dataSource = new DriverManagerDataSource();
@@ -33,6 +33,6 @@ DriverManagerDataSource dataSource() {
3333
dataSource.setPassword("");
3434
return dataSource;
3535
}
36-
// end::dataSourceBean[]
36+
// end::snippet[]
3737

3838
}

framework-docs/src/main/kotlin/org/springframework/docs/dataaccess/jdbc/jdbcdatasource/BasicDataSourceConfiguration.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import org.springframework.context.annotation.Configuration
77
@Configuration
88
class BasicDataSourceConfiguration {
99

10-
// tag::dataSourceBean[]
10+
// tag::snippet[]
1111
@Bean(destroyMethod = "close")
1212
fun dataSource() = BasicDataSource().apply {
1313
driverClassName = "org.hsqldb.jdbcDriver"
1414
url = "jdbc:hsqldb:hsql://localhost:"
1515
username = "sa"
1616
password = ""
1717
}
18-
// end::dataSourceBean[]
18+
// end::snippet[]
1919
}

framework-docs/src/main/kotlin/org/springframework/docs/dataaccess/jdbc/jdbcdatasource/ComboPooledDataSourceConfiguration.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import org.springframework.context.annotation.Configuration
77
@Configuration
88
internal class ComboPooledDataSourceConfiguration {
99

10-
// tag::dataSourceBean[]
10+
// tag::snippet[]
1111
@Bean(destroyMethod = "close")
1212
fun dataSource() = ComboPooledDataSource().apply {
1313
driverClass = "org.hsqldb.jdbcDriver"
1414
jdbcUrl = "jdbc:hsqldb:hsql://localhost:"
1515
user = "sa"
1616
password = ""
1717
}
18-
// end::dataSourceBean[]
18+
// end::snippet[]
1919

2020
}

framework-docs/src/main/kotlin/org/springframework/docs/dataaccess/jdbc/jdbcdatasource/DriverManagerDataSourceConfiguration.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ import org.springframework.jdbc.datasource.DriverManagerDataSource
2323
@Configuration
2424
class DriverManagerDataSourceConfiguration {
2525

26-
// tag::dataSourceBean[]
26+
// tag::snippet[]
2727
@Bean
2828
fun dataSource() = DriverManagerDataSource().apply {
2929
setDriverClassName("org.hsqldb.jdbcDriver")
3030
url = "jdbc:hsqldb:hsql://localhost:"
3131
username = "sa"
3232
password = ""
3333
}
34-
// end::dataSourceBean[]
34+
// end::snippet[]
3535

3636
}

framework-docs/src/main/resources/org/springframework/docs/dataaccess/jdbc/jdbcdatasource/BasicDataSourceConfiguration.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<beans xmlns="http://www.springframework.org/schema/beans"
33
xmlns:context="http://www.springframework.org/schema/context">
44

5-
<!-- tag::dataSourceBean[] -->
5+
<!-- tag::snippet[] -->
66
<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close">
77
<property name="driverClassName" value="${jdbc.driverClassName}"/>
88
<property name="url" value="${jdbc.url}"/>
@@ -11,5 +11,5 @@
1111
</bean>
1212

1313
<context:property-placeholder location="jdbc.properties"/>
14-
<!-- end::dataSourceBean[] -->
14+
<!-- end::snippet[] -->
1515
</beans>

framework-docs/src/main/resources/org/springframework/docs/dataaccess/jdbc/jdbcdatasource/ComboPooledDataSourceConfiguration.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<beans xmlns="http://www.springframework.org/schema/beans"
33
xmlns:context="http://www.springframework.org/schema/context">
44

5-
<!-- tag::dataSourceBean[] -->
5+
<!-- tag::snippet[] -->
66
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
77
<property name="driverClass" value="${jdbc.driverClassName}"/>
88
<property name="jdbcUrl" value="${jdbc.url}"/>
@@ -11,5 +11,5 @@
1111
</bean>
1212

1313
<context:property-placeholder location="jdbc.properties"/>
14-
<!-- end::dataSourceBean[] -->
14+
<!-- end::snippet[] -->
1515
</beans>

framework-docs/src/main/resources/org/springframework/docs/dataaccess/jdbc/jdbcdatasource/DriverManagerDataSourceConfiguration.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<beans xmlns="http://www.springframework.org/schema/beans"
33
xmlns:context="http://www.springframework.org/schema/context">
44

5-
<!-- tag::dataSourceBean[] -->
5+
<!-- tag::snippet[] -->
66
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
77
<property name="driverClassName" value="${jdbc.driverClassName}"/>
88
<property name="url" value="${jdbc.url}"/>
@@ -11,5 +11,5 @@
1111
</bean>
1212

1313
<context:property-placeholder location="jdbc.properties"/>
14-
<!-- end::dataSourceBean[] -->
14+
<!-- end::snippet[] -->
1515
</beans>

0 commit comments

Comments
 (0)