fix junit test case
This commit is contained in:
		
							parent
							
								
									2478c10c84
								
							
						
					
					
						commit
						b43d6e9bc8
					
				| @ -5,9 +5,7 @@ import java.util.Optional; | ||||
| import org.springframework.data.domain.AuditorAware; | ||||
| import org.springframework.security.core.Authentication; | ||||
| import org.springframework.security.core.context.SecurityContextHolder; | ||||
| import org.springframework.stereotype.Component; | ||||
| 
 | ||||
| @Component("auditorProvider") | ||||
| public class AuditorAwareImpl implements AuditorAware<String> { | ||||
| 
 | ||||
|     @Override | ||||
|  | ||||
| @ -23,6 +23,7 @@ import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; | ||||
| import org.springframework.transaction.PlatformTransactionManager; | ||||
| import org.springframework.transaction.annotation.EnableTransactionManagement; | ||||
| 
 | ||||
| import com.baeldung.hibernate.audit.AuditorAwareImpl; | ||||
| import com.baeldung.persistence.dao.IBarAuditableDao; | ||||
| import com.baeldung.persistence.dao.IBarDao; | ||||
| import com.baeldung.persistence.dao.IFooAuditableDao; | ||||
| @ -58,6 +59,11 @@ public class PersistenceConfig { | ||||
|         super(); | ||||
|     } | ||||
| 
 | ||||
|     @Bean("auditorProvider") | ||||
|     public AuditorAwareImpl auditorAwareImpl() { | ||||
|         return new AuditorAwareImpl(); | ||||
|     } | ||||
|      | ||||
|     @Bean | ||||
|     public LocalSessionFactoryBean sessionFactory() { | ||||
|         final LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean(); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user