提交 13e42c7c 编写于 作者: C cherrylzhao

revise spring-boot jpa example.

上级 89f71a15
......@@ -17,13 +17,10 @@
package io.shardingsphere.example.common.jpa.service;
import io.shardingsphere.example.common.entity.Order;
import io.shardingsphere.example.common.entity.OrderItem;
import io.shardingsphere.example.common.jpa.entity.OrderEntity;
import io.shardingsphere.example.common.jpa.entity.OrderItemEntity;
import io.shardingsphere.example.common.repository.OrderItemRepository;
import io.shardingsphere.example.common.repository.OrderRepository;
import io.shardingsphere.example.common.service.CommonService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......
......@@ -28,10 +28,10 @@ import org.springframework.context.annotation.ComponentScan;
@ComponentScan("io.shardingsphere.example.common.jpa")
@EntityScan(basePackages = "io.shardingsphere.example.common.jpa.entity")
@SpringBootApplication(exclude = JtaAutoConfiguration.class)
public class SpringBootJPAMain {
public class SpringBootExample {
public static void main(final String[] args) {
try (ConfigurableApplicationContext applicationContext = SpringApplication.run(SpringBootJPAMain.class, args)) {
try (ConfigurableApplicationContext applicationContext = SpringApplication.run(SpringBootExample.class, args)) {
JPACommonService commonService = applicationContext.getBean(JPACommonService.class);
commonService.processSuccess();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册