Skip to content

Commit 013058d

Browse files
committed
#290 - Polishing.
Imports and typos in JavaDoc.
1 parent 663c8bd commit 013058d

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

jpa/multiple-datasources/src/main/java/example/springdata/jpa/multipleds/DataInitializer.java

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,28 @@
1515
*/
1616
package example.springdata.jpa.multipleds;
1717

18-
import javax.sql.DataSource;
19-
20-
import lombok.NonNull;
21-
import lombok.RequiredArgsConstructor;
22-
23-
import org.springframework.stereotype.Component;
24-
import org.springframework.transaction.annotation.Transactional;
25-
import org.springframework.util.Assert;
26-
2718
import example.springdata.jpa.multipleds.customer.Customer;
2819
import example.springdata.jpa.multipleds.customer.Customer.CustomerId;
2920
import example.springdata.jpa.multipleds.customer.CustomerRepository;
3021
import example.springdata.jpa.multipleds.order.Order;
3122
import example.springdata.jpa.multipleds.order.Order.LineItem;
3223
import example.springdata.jpa.multipleds.order.OrderRepository;
24+
import lombok.NonNull;
25+
import lombok.RequiredArgsConstructor;
26+
27+
import javax.sql.DataSource;
28+
29+
import org.springframework.stereotype.Component;
30+
import org.springframework.transaction.annotation.Transactional;
31+
import org.springframework.util.Assert;
3332

3433
/**
3534
* Sample component to demonstrate how to work with repositories backed by different {@link DataSource}s. Note how we
3635
* explicitly select a transaction manager by name. In this particular case (only one operation on the repository) this
37-
* is not strictly necessary. However, if multiple repositories or multiple interactions on the very same repsoitory are
36+
* is not strictly necessary. However, if multiple repositories or multiple interactions on the very same repository are
3837
* to be executed in a method we need to expand the transaction boundary around these interactions. It's recommended to
3938
* create a dedicated annotation meta-annotated with {@code @Transactional("…")} to be able to refer to a particular
40-
* datasource without using String qualifiers.
39+
* data source without using String qualifiers.
4140
* <p>
4241
* Also, not that one cannot interact with both databases in a single, transactional method as transactions are thread
4342
* bound in Spring an thus only a single transaction can be active in a single thread. See {@link Application#init()}

0 commit comments

Comments
 (0)