| | |
| | | |
| | | import javax.persistence.EntityManagerFactory; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.hibernate.SessionFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.SpringApplication; |
| | |
| | | @ImportResource("classpath:Transaction.xml") |
| | | @EnableScheduling |
| | | @EnableCaching |
| | | @Slf4j |
| | | @EnableAutoConfiguration(exclude = { |
| | | JndiConnectionFactoryAutoConfiguration.class, |
| | | DataSourceAutoConfiguration.class, |
| | |
| | | DataSourceTransactionManagerAutoConfiguration.class}) |
| | | public class SccApplication { |
| | | public static void main(String[] args) { |
| | | long time = System.currentTimeMillis(); |
| | | SpringApplication.run(SccApplication.class, args); |
| | | log.info("启动成功,耗时: " + (System.currentTimeMillis() - time) / 1000 + "s"); |
| | | } |
| | | |
| | | @Autowired |
| | |
| | | return entityManagerFactory.unwrap(SessionFactory.class); |
| | | } |
| | | |
| | | |
| | | // @Bean |
| | | // public RedisTemplate redisTemplate(){ |
| | | // return new RedisTemplate(); |