Description
Simon Wong opened SPR-9479 and commented
The Spring reference didn't mention that I MUST use @Configuration
for the configuration class being imported. And I found that the bean could be created normally most of the time.
The case I found that if @Configuration
is missing, transaction is not behave normally in some cases.
I have setup a simple program to illustrate this. Please refer to "readme.txt" for the running procedures. From the log, I have checked that the transaction commit command has been issued, but the end result is the value is not committed.
In the example, I have already used SingleConnectionDataSource, to avoid multiple database connection issue.
I have also tried to move the @EnableTransactionManagement
and transactionManager() to other Spring Java Config class (no matter with/without @Configuration
), but the problem still occurs.
Affects: 3.1.1
Attachments:
- TestSpring31Transaction.zip (8.20 kB)
Issue Links:
- spring-test allows you to reference configuration classes that aren't annotated with @Configuration [SPR-9051] #13690 spring-test allows you to reference configuration classes that aren't annotated with
@Configuration
("duplicates")