Skip to content

Commit 5b55cef

Browse files
hrybssbrannen
authored andcommitted
Fix @transactional docs regarding method visibility
Closes gh-27001
1 parent 911aca1 commit 5b55cef

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/docs/asciidoc/data-access.adoc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,19 +1365,19 @@ Consider the following class definition:
13651365
@Transactional
13661366
public class DefaultFooService implements FooService {
13671367
1368-
Foo getFoo(String fooName) {
1368+
public Foo getFoo(String fooName) {
13691369
// ...
13701370
}
13711371
1372-
Foo getFoo(String fooName, String barName) {
1372+
public Foo getFoo(String fooName, String barName) {
13731373
// ...
13741374
}
13751375
1376-
void insertFoo(Foo foo) {
1376+
public void insertFoo(Foo foo) {
13771377
// ...
13781378
}
13791379
1380-
void updateFoo(Foo foo) {
1380+
public void updateFoo(Foo foo) {
13811381
// ...
13821382
}
13831383
}
@@ -1407,7 +1407,7 @@ Consider the following class definition:
14071407
}
14081408
----
14091409

1410-
Used at the class level as above, the annotation indicates a default for all methods
1410+
Used at the class level as above, the annotation indicates a default for all public methods
14111411
of the declaring class (as well as its subclasses). Alternatively, each method can
14121412
get annotated individually. Note that a class-level annotation does not apply to
14131413
ancestor classes up the class hierarchy; in such a scenario, methods need to be
@@ -1471,19 +1471,19 @@ programming arrangements as the following listing shows:
14711471
@Transactional
14721472
public class DefaultFooService implements FooService {
14731473
1474-
Publisher<Foo> getFoo(String fooName) {
1474+
public Publisher<Foo> getFoo(String fooName) {
14751475
// ...
14761476
}
14771477
1478-
Mono<Foo> getFoo(String fooName, String barName) {
1478+
public Mono<Foo> getFoo(String fooName, String barName) {
14791479
// ...
14801480
}
14811481
1482-
Mono<Void> insertFoo(Foo foo) {
1482+
public Mono<Void> insertFoo(Foo foo) {
14831483
// ...
14841484
}
14851485
1486-
Mono<Void> updateFoo(Foo foo) {
1486+
public Mono<Void> updateFoo(Foo foo) {
14871487
// ...
14881488
}
14891489
}

0 commit comments

Comments
 (0)