Loading example-core/example-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/service/CommonServiceImpl.java→example-core/example-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/service/OrderServiceImpl.java +2 −2 Original line number Diff line number Diff line Loading @@ -27,13 +27,13 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.List; public final class CommonServiceImpl implements ExampleService { public final class OrderServiceImpl implements ExampleService { private OrderRepository orderRepository; private OrderItemRepository orderItemRepository; public CommonServiceImpl(final OrderRepository orderRepository, final OrderItemRepository orderItemRepository) { public OrderServiceImpl(final OrderRepository orderRepository, final OrderItemRepository orderItemRepository) { this.orderRepository = orderRepository; this.orderItemRepository = orderItemRepository; } Loading sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/JavaConfigurationExample.java +7 −7 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ package org.apache.shardingsphere.example.orchestration.raw.jdbc; import org.apache.shardingsphere.example.core.jdbc.repository.OrderItemRepositoryImpl; import org.apache.shardingsphere.example.core.jdbc.repository.OrderRepositoryImpl; import org.apache.shardingsphere.example.core.jdbc.service.CommonServiceImpl; import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl; import org.apache.shardingsphere.example.core.api.service.ExampleService; import org.apache.shardingsphere.example.config.ExampleConfiguration; import org.apache.shardingsphere.example.orchestration.raw.jdbc.config.RegistryCenterConfigurationUtil; Loading Loading @@ -56,10 +56,10 @@ public class JavaConfigurationExample { public static void main(final String[] args) throws Exception { DataSource dataSource = getDataSource(shardingType, loadConfigFromRegCenter); ExampleService commonService = getCommonService(dataSource); commonService.initEnvironment(); commonService.processSuccess(); commonService.cleanEnvironment(); ExampleService exampleService = getExampleService(dataSource); exampleService.initEnvironment(); exampleService.processSuccess(); exampleService.cleanEnvironment(); closeDataSource(dataSource); } Loading Loading @@ -87,8 +87,8 @@ public class JavaConfigurationExample { return RegistryCenterType.ZOOKEEPER == registryCenterType ? RegistryCenterConfigurationUtil.getZooKeeperConfiguration() : RegistryCenterConfigurationUtil.getEtcdConfiguration(); } private static ExampleService getCommonService(final DataSource dataSource) { return new CommonServiceImpl(new OrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource)); private static ExampleService getExampleService(final DataSource dataSource) { return new OrderServiceImpl(new OrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource)); } private static void closeDataSource(final DataSource dataSource) throws Exception { Loading sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/YamlConfigurationExample.java +7 −7 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ package org.apache.shardingsphere.example.orchestration.raw.jdbc; import org.apache.shardingsphere.example.core.jdbc.repository.OrderItemRepositoryImpl; import org.apache.shardingsphere.example.core.jdbc.repository.OrderRepositoryImpl; import org.apache.shardingsphere.example.core.jdbc.service.CommonServiceImpl; import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl; import org.apache.shardingsphere.example.core.api.service.ExampleService; import org.apache.shardingsphere.example.type.RegistryCenterType; import org.apache.shardingsphere.example.type.ShardingType; Loading Loading @@ -52,10 +52,10 @@ public class YamlConfigurationExample { public static void main(final String[] args) throws Exception { DataSource dataSource = getDataSource(registryCenterType, loadConfigFromRegCenter, shardingType); ExampleService commonService = getCommonService(dataSource); commonService.initEnvironment(); commonService.processSuccess(); commonService.cleanEnvironment(); ExampleService exampleService = getExampleService(dataSource); exampleService.initEnvironment(); exampleService.processSuccess(); exampleService.cleanEnvironment(); closeDataSource(dataSource); } Loading @@ -80,8 +80,8 @@ public class YamlConfigurationExample { return new File(Thread.currentThread().getClass().getResource(fileName).getFile()); } private static ExampleService getCommonService(final DataSource dataSource) { return new CommonServiceImpl(new OrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource)); private static ExampleService getExampleService(final DataSource dataSource) { return new OrderServiceImpl(new OrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource)); } private static void closeDataSource(final DataSource dataSource) throws Exception { Loading sharding-jdbc-example/orchestration-example/orchestration-spring-boot-example/src/main/java/org/apache/shardingsphere/example/orchestration/spring/boot/SpringBootExample.java +2 −2 Original line number Diff line number Diff line Loading @@ -34,8 +34,8 @@ public class SpringBootExample { public static void main(final String[] args) throws SQLException { try (ConfigurableApplicationContext applicationContext = SpringApplication.run(SpringBootExample.class, args)) { JPACommonService commonService = applicationContext.getBean(JPACommonService.class); commonService.processSuccess(); JPACommonService exampleService = applicationContext.getBean(JPACommonService.class); exampleService.processSuccess(); } } } sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-example/src/main/java/org/apache/shardingsphere/example/orchestration/spring/namespace/SpringNamespaceExample.java +4 −4 Original line number Diff line number Diff line Loading @@ -39,10 +39,10 @@ public class SpringNamespaceExample { public static void main(final String[] args) throws SQLException { try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(getApplicationFile())) { SpringPojoService commonService = applicationContext.getBean(SpringPojoService.class); commonService.initEnvironment(); commonService.processSuccess(); commonService.cleanEnvironment(); SpringPojoService exampleService = applicationContext.getBean(SpringPojoService.class); exampleService.initEnvironment(); exampleService.processSuccess(); exampleService.cleanEnvironment(); } } Loading Loading
example-core/example-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/service/CommonServiceImpl.java→example-core/example-jdbc/src/main/java/org/apache/shardingsphere/example/core/jdbc/service/OrderServiceImpl.java +2 −2 Original line number Diff line number Diff line Loading @@ -27,13 +27,13 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.List; public final class CommonServiceImpl implements ExampleService { public final class OrderServiceImpl implements ExampleService { private OrderRepository orderRepository; private OrderItemRepository orderItemRepository; public CommonServiceImpl(final OrderRepository orderRepository, final OrderItemRepository orderItemRepository) { public OrderServiceImpl(final OrderRepository orderRepository, final OrderItemRepository orderItemRepository) { this.orderRepository = orderRepository; this.orderItemRepository = orderItemRepository; } Loading
sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/JavaConfigurationExample.java +7 −7 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ package org.apache.shardingsphere.example.orchestration.raw.jdbc; import org.apache.shardingsphere.example.core.jdbc.repository.OrderItemRepositoryImpl; import org.apache.shardingsphere.example.core.jdbc.repository.OrderRepositoryImpl; import org.apache.shardingsphere.example.core.jdbc.service.CommonServiceImpl; import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl; import org.apache.shardingsphere.example.core.api.service.ExampleService; import org.apache.shardingsphere.example.config.ExampleConfiguration; import org.apache.shardingsphere.example.orchestration.raw.jdbc.config.RegistryCenterConfigurationUtil; Loading Loading @@ -56,10 +56,10 @@ public class JavaConfigurationExample { public static void main(final String[] args) throws Exception { DataSource dataSource = getDataSource(shardingType, loadConfigFromRegCenter); ExampleService commonService = getCommonService(dataSource); commonService.initEnvironment(); commonService.processSuccess(); commonService.cleanEnvironment(); ExampleService exampleService = getExampleService(dataSource); exampleService.initEnvironment(); exampleService.processSuccess(); exampleService.cleanEnvironment(); closeDataSource(dataSource); } Loading Loading @@ -87,8 +87,8 @@ public class JavaConfigurationExample { return RegistryCenterType.ZOOKEEPER == registryCenterType ? RegistryCenterConfigurationUtil.getZooKeeperConfiguration() : RegistryCenterConfigurationUtil.getEtcdConfiguration(); } private static ExampleService getCommonService(final DataSource dataSource) { return new CommonServiceImpl(new OrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource)); private static ExampleService getExampleService(final DataSource dataSource) { return new OrderServiceImpl(new OrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource)); } private static void closeDataSource(final DataSource dataSource) throws Exception { Loading
sharding-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/YamlConfigurationExample.java +7 −7 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ package org.apache.shardingsphere.example.orchestration.raw.jdbc; import org.apache.shardingsphere.example.core.jdbc.repository.OrderItemRepositoryImpl; import org.apache.shardingsphere.example.core.jdbc.repository.OrderRepositoryImpl; import org.apache.shardingsphere.example.core.jdbc.service.CommonServiceImpl; import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl; import org.apache.shardingsphere.example.core.api.service.ExampleService; import org.apache.shardingsphere.example.type.RegistryCenterType; import org.apache.shardingsphere.example.type.ShardingType; Loading Loading @@ -52,10 +52,10 @@ public class YamlConfigurationExample { public static void main(final String[] args) throws Exception { DataSource dataSource = getDataSource(registryCenterType, loadConfigFromRegCenter, shardingType); ExampleService commonService = getCommonService(dataSource); commonService.initEnvironment(); commonService.processSuccess(); commonService.cleanEnvironment(); ExampleService exampleService = getExampleService(dataSource); exampleService.initEnvironment(); exampleService.processSuccess(); exampleService.cleanEnvironment(); closeDataSource(dataSource); } Loading @@ -80,8 +80,8 @@ public class YamlConfigurationExample { return new File(Thread.currentThread().getClass().getResource(fileName).getFile()); } private static ExampleService getCommonService(final DataSource dataSource) { return new CommonServiceImpl(new OrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource)); private static ExampleService getExampleService(final DataSource dataSource) { return new OrderServiceImpl(new OrderRepositoryImpl(dataSource), new OrderItemRepositoryImpl(dataSource)); } private static void closeDataSource(final DataSource dataSource) throws Exception { Loading
sharding-jdbc-example/orchestration-example/orchestration-spring-boot-example/src/main/java/org/apache/shardingsphere/example/orchestration/spring/boot/SpringBootExample.java +2 −2 Original line number Diff line number Diff line Loading @@ -34,8 +34,8 @@ public class SpringBootExample { public static void main(final String[] args) throws SQLException { try (ConfigurableApplicationContext applicationContext = SpringApplication.run(SpringBootExample.class, args)) { JPACommonService commonService = applicationContext.getBean(JPACommonService.class); commonService.processSuccess(); JPACommonService exampleService = applicationContext.getBean(JPACommonService.class); exampleService.processSuccess(); } } }
sharding-jdbc-example/orchestration-example/orchestration-spring-namespace-example/src/main/java/org/apache/shardingsphere/example/orchestration/spring/namespace/SpringNamespaceExample.java +4 −4 Original line number Diff line number Diff line Loading @@ -39,10 +39,10 @@ public class SpringNamespaceExample { public static void main(final String[] args) throws SQLException { try (ConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(getApplicationFile())) { SpringPojoService commonService = applicationContext.getBean(SpringPojoService.class); commonService.initEnvironment(); commonService.processSuccess(); commonService.cleanEnvironment(); SpringPojoService exampleService = applicationContext.getBean(SpringPojoService.class); exampleService.initEnvironment(); exampleService.processSuccess(); exampleService.cleanEnvironment(); } } Loading