Spring Hibernate test transaction cannot be rolled back

the test case cannot roll back the data and is inserted directly into the database?

applicationContext.xml

<context:annotation-config></context:annotation-config>

<!--dataSource-->
<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close"
      p:driverClassName="com.mysql.jdbc.Driver"
      p:url="jdbc:mysql://192.168.6.131:3306/sampledb?characterEncoding=UTF-8"
      p:username="hyx"
      p:password="sghyx52413"/>

<!--sessionFactory-->
<bean id="sessionFactory" class="org.springframework.orm.hibernate5.LocalSessionFactoryBean"
      p:dataSource-ref="dataSource"
      p:mappingLocations="classpath*:*.hbm.xml">

    <property name="hibernateProperties">
        <props>
            <prop key="hibernate.dialect">
                org.hibernate.dialect.MySQLDialect
            </prop>
            <prop key="hibernate.show_sql">
                true
            </prop>
        </props>
    </property>

</bean>

<bean class="org.springframework.orm.hibernate5.HibernateTemplate">
    <property name="sessionFactory" ref="sessionFactory"/>
    <property name="checkWriteOperations" value="false"/>
</bean>

<bean id="txManager"
      class="org.springframework.orm.hibernate5.HibernateTransactionManager"
      p:sessionFactory-ref="sessionFactory"/>

<tx:annotation-driven transaction-manager="txManager"/>



UserTest.java

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate5.HibernateTemplate;
import org.springframework.test.annotation.Rollback;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.transaction.annotation.Transactional;

import static org.junit.Assert.*;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:applicationContext.xml")
@Transactional(transactionManager = "txManager")
@Rollback()
public class UserTest extends AbstractJUnit4SpringContextTests {


@Autowired
private HibernateTemplate template;

@Test
public void saveTest() {
    User user = new User("Test1", "Test1");

    template.save(user);

}
}
Mar.06,2021

needs to use transactions to inherit the AbstractTransactionalJUnit4SpringContextTests class, or does not inherit the class
instead of AbstractJUnit4SpringContextTests.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36759-41057.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36759-41057.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?