Skip to content

Commit f27382c

Browse files
committed
Consistently indent code with tabs in reference manual
1 parent 6bc1968 commit f27382c

28 files changed

+544
-552
lines changed

Diff for: framework-docs/modules/ROOT/pages/core/aot.adoc

+8-8
Original file line numberDiff line numberDiff line change
@@ -469,20 +469,20 @@ Java::
469469
+
470470
[source,java,indent=0,subs="verbatim,quotes"]
471471
----
472-
RootBeanDefinition beanDefinition = new RootBeanDefinition(ClientFactoryBean.class);
473-
beanDefinition.setTargetType(ResolvableType.forClassWithGenerics(ClientFactoryBean.class, MyClient.class));
474-
// ...
475-
registry.registerBeanDefinition("myClient", beanDefinition);
472+
RootBeanDefinition beanDefinition = new RootBeanDefinition(ClientFactoryBean.class);
473+
beanDefinition.setTargetType(ResolvableType.forClassWithGenerics(ClientFactoryBean.class, MyClient.class));
474+
// ...
475+
registry.registerBeanDefinition("myClient", beanDefinition);
476476
----
477477
478478
Kotlin::
479479
+
480480
[source,kotlin,indent=0,subs="verbatim,quotes"]
481481
----
482-
val beanDefinition = RootBeanDefinition(ClientFactoryBean::class.java)
483-
beanDefinition.setTargetType(ResolvableType.forClassWithGenerics(ClientFactoryBean::class.java, MyClient::class.java));
484-
// ...
485-
registry.registerBeanDefinition("myClient", beanDefinition)
482+
val beanDefinition = RootBeanDefinition(ClientFactoryBean::class.java)
483+
beanDefinition.setTargetType(ResolvableType.forClassWithGenerics(ClientFactoryBean::class.java, MyClient::class.java));
484+
// ...
485+
registry.registerBeanDefinition("myClient", beanDefinition)
486486
----
487487
======
488488

Diff for: framework-docs/modules/ROOT/pages/core/beans/annotation-config/value-annotations.adoc

+42-42
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ Java::
99
+
1010
[source,java,indent=0,subs="verbatim,quotes"]
1111
----
12-
@Component
13-
public class MovieRecommender {
12+
@Component
13+
public class MovieRecommender {
1414
15-
private final String catalog;
15+
private final String catalog;
1616
17-
public MovieRecommender(@Value("${catalog.name}") String catalog) {
18-
this.catalog = catalog;
19-
}
20-
}
17+
public MovieRecommender(@Value("${catalog.name}") String catalog) {
18+
this.catalog = catalog;
19+
}
20+
}
2121
----
2222
2323
Kotlin::
@@ -37,9 +37,9 @@ Java::
3737
+
3838
[source,java,indent=0,subs="verbatim,quotes"]
3939
----
40-
@Configuration
41-
@PropertySource("classpath:application.properties")
42-
public class AppConfig { }
40+
@Configuration
41+
@PropertySource("classpath:application.properties")
42+
public class AppConfig { }
4343
----
4444
4545
Kotlin::
@@ -56,7 +56,7 @@ And the following `application.properties` file:
5656

5757
[source,java,indent=0,subs="verbatim,quotes"]
5858
----
59-
catalog.name=MovieCatalog
59+
catalog.name=MovieCatalog
6060
----
6161

6262
In that case, the `catalog` parameter and field will be equal to the `MovieCatalog` value.
@@ -119,15 +119,15 @@ Java::
119119
+
120120
[source,java,indent=0,subs="verbatim,quotes"]
121121
----
122-
@Component
123-
public class MovieRecommender {
122+
@Component
123+
public class MovieRecommender {
124124
125-
private final String catalog;
125+
private final String catalog;
126126
127-
public MovieRecommender(@Value("${catalog.name:defaultCatalog}") String catalog) {
128-
this.catalog = catalog;
129-
}
130-
}
127+
public MovieRecommender(@Value("${catalog.name:defaultCatalog}") String catalog) {
128+
this.catalog = catalog;
129+
}
130+
}
131131
----
132132
133133
Kotlin::
@@ -150,16 +150,16 @@ Java::
150150
+
151151
[source,java,indent=0,subs="verbatim,quotes"]
152152
----
153-
@Configuration
154-
public class AppConfig {
153+
@Configuration
154+
public class AppConfig {
155155
156-
@Bean
157-
public ConversionService conversionService() {
158-
DefaultFormattingConversionService conversionService = new DefaultFormattingConversionService();
159-
conversionService.addConverter(new MyCustomConverter());
160-
return conversionService;
161-
}
162-
}
156+
@Bean
157+
public ConversionService conversionService() {
158+
DefaultFormattingConversionService conversionService = new DefaultFormattingConversionService();
159+
conversionService.addConverter(new MyCustomConverter());
160+
return conversionService;
161+
}
162+
}
163163
----
164164
165165
Kotlin::
@@ -188,15 +188,15 @@ Java::
188188
+
189189
[source,java,indent=0,subs="verbatim,quotes"]
190190
----
191-
@Component
192-
public class MovieRecommender {
191+
@Component
192+
public class MovieRecommender {
193193
194-
private final String catalog;
194+
private final String catalog;
195195
196-
public MovieRecommender(@Value("#{systemProperties['user.catalog'] + 'Catalog' }") String catalog) {
197-
this.catalog = catalog;
198-
}
199-
}
196+
public MovieRecommender(@Value("#{systemProperties['user.catalog'] + 'Catalog' }") String catalog) {
197+
this.catalog = catalog;
198+
}
199+
}
200200
----
201201
202202
Kotlin::
@@ -217,16 +217,16 @@ Java::
217217
+
218218
[source,java,indent=0,subs="verbatim,quotes"]
219219
----
220-
@Component
221-
public class MovieRecommender {
220+
@Component
221+
public class MovieRecommender {
222222
223-
private final Map<String, Integer> countOfMoviesPerCatalog;
223+
private final Map<String, Integer> countOfMoviesPerCatalog;
224224
225-
public MovieRecommender(
226-
@Value("#{{'Thriller': 100, 'Comedy': 300}}") Map<String, Integer> countOfMoviesPerCatalog) {
227-
this.countOfMoviesPerCatalog = countOfMoviesPerCatalog;
228-
}
229-
}
225+
public MovieRecommender(
226+
@Value("#{{'Thriller': 100, 'Comedy': 300}}") Map<String, Integer> countOfMoviesPerCatalog) {
227+
this.countOfMoviesPerCatalog = countOfMoviesPerCatalog;
228+
}
229+
}
230230
----
231231
232232
Kotlin::

Diff for: framework-docs/modules/ROOT/pages/core/beans/basics.adoc

+7-7
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Kotlin::
119119
+
120120
[source,kotlin,indent=0,subs="verbatim,quotes"]
121121
----
122-
val context = ClassPathXmlApplicationContext("services.xml", "daos.xml")
122+
val context = ClassPathXmlApplicationContext("services.xml", "daos.xml")
123123
----
124124
======
125125

@@ -310,16 +310,16 @@ Kotlin::
310310
+
311311
[source,kotlin,indent=0,subs="verbatim,quotes"]
312312
----
313-
import org.springframework.beans.factory.getBean
313+
import org.springframework.beans.factory.getBean
314314
315315
// create and configure beans
316-
val context = ClassPathXmlApplicationContext("services.xml", "daos.xml")
316+
val context = ClassPathXmlApplicationContext("services.xml", "daos.xml")
317317
318-
// retrieve configured instance
319-
val service = context.getBean<PetStoreService>("petStore")
318+
// retrieve configured instance
319+
val service = context.getBean<PetStoreService>("petStore")
320320
321-
// use configured instance
322-
var userList = service.getUsernameList()
321+
// use configured instance
322+
var userList = service.getUsernameList()
323323
----
324324
======
325325

Diff for: framework-docs/modules/ROOT/pages/core/beans/context-introduction.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ the classes above:
513513
<property name="notificationAddress" value="[email protected]"/>
514514
</bean>
515515
516-
<!-- optional: a custom ApplicationEventMulticaster definition -->
516+
<!-- optional: a custom ApplicationEventMulticaster definition -->
517517
<bean id="applicationEventMulticaster" class="org.springframework.context.event.SimpleApplicationEventMulticaster">
518518
<property name="taskExecutor" ref="..."/>
519519
<property name="errorHandler" ref="..."/>

Diff for: framework-docs/modules/ROOT/pages/core/beans/factory-extension.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ Kotlin::
226226
+
227227
[source,kotlin,indent=0,subs="verbatim,quotes"]
228228
----
229-
import org.springframework.beans.factory.getBean
229+
import org.springframework.beans.factory.getBean
230230
231231
fun main() {
232232
val ctx = ClassPathXmlApplicationContext("scripting/beans.xml")

Diff for: framework-docs/modules/ROOT/pages/core/spring-jcl.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Java::
3131
----
3232
public class MyBean {
3333
private final Log log = LogFactory.getLog(getClass());
34-
// ...
34+
// ...
3535
}
3636
----
3737
@@ -40,8 +40,8 @@ Kotlin::
4040
[source,kotlin,indent=0,subs="verbatim,quotes"]
4141
----
4242
class MyBean {
43-
private val log = LogFactory.getLog(javaClass)
44-
// ...
43+
private val log = LogFactory.getLog(javaClass)
44+
// ...
4545
}
4646
----
4747
======

Diff for: framework-docs/modules/ROOT/pages/data-access/jdbc/embedded-database-support.adoc

+21-21
Original file line numberDiff line numberDiff line change
@@ -78,27 +78,27 @@ Java::
7878
+
7979
[source,java,indent=0,subs="verbatim,quotes"]
8080
----
81-
@Configuration
82-
public class DataSourceConfig {
83-
84-
@Bean
85-
public DataSource dataSource() {
86-
return new EmbeddedDatabaseBuilder()
87-
.setDatabaseConfigurer(EmbeddedDatabaseConfigurers
88-
.customizeConfigurer(H2, this::customize))
89-
.addScript("schema.sql")
90-
.build();
91-
}
92-
93-
private EmbeddedDatabaseConfigurer customize(EmbeddedDatabaseConfigurer defaultConfigurer) {
94-
return new EmbeddedDatabaseConfigurerDelegate(defaultConfigurer) {
95-
@Override
96-
public void configureConnectionProperties(ConnectionProperties properties, String databaseName) {
97-
super.configureConnectionProperties(properties, databaseName);
98-
properties.setDriverClass(CustomDriver.class);
99-
}
100-
};
101-
}
81+
@Configuration
82+
public class DataSourceConfig {
83+
84+
@Bean
85+
public DataSource dataSource() {
86+
return new EmbeddedDatabaseBuilder()
87+
.setDatabaseConfigurer(EmbeddedDatabaseConfigurers
88+
.customizeConfigurer(H2, this::customize))
89+
.addScript("schema.sql")
90+
.build();
91+
}
92+
93+
private EmbeddedDatabaseConfigurer customize(EmbeddedDatabaseConfigurer defaultConfigurer) {
94+
return new EmbeddedDatabaseConfigurerDelegate(defaultConfigurer) {
95+
@Override
96+
public void configureConnectionProperties(ConnectionProperties properties, String databaseName) {
97+
super.configureConnectionProperties(properties, databaseName);
98+
properties.setDriverClass(CustomDriver.class);
99+
}
100+
};
101+
}
102102
}
103103
----
104104

0 commit comments

Comments
 (0)