提交 6a97b4c5 编写于 作者: 武汉红喜's avatar 武汉红喜

rename to shardingsphere

上级 a64e1304
......@@ -20,7 +20,7 @@ whatsmars-elasticsearch | Elasticsearch
whatsmars-mq | 消息中间件RocketMQ,Kafka等
whatsmars-redis | Redis客户端简单封装
whatsmars-rpc | Transport & RPC & Serialization
whatsmars-sharding-jdbc | 分布式数据库中间件
whatsmars-shardingsphere | 分布式数据库中间件
whatsmars-spring | Spring Framework
whatsmars-spring-boot | Spring Boot 实战
whatsmars-spring-boot-samples | Spring Boot 2+
......
......@@ -27,7 +27,7 @@
<module>whatsmars-mq</module>
<module>whatsmars-redis</module>
<module>whatsmars-spring-cloud</module>
<module>whatsmars-sharding-jdbc</module>
<module>whatsmars-shardingsphere</module>
<module>whatsmars-spring-boot-samples</module>
<module>whatsmars-elasticsearch</module>
<module>whatsmars-zk</module>
......
......@@ -10,7 +10,7 @@
<version>Rocket.S3</version>
</parent>
<artifactId>whatsmars-sharding-jdbc</artifactId>
<artifactId>whatsmars-shardingsphere</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>shardingjdbc demo</description>
......
package org.hongxi.whatsmars.shardingjdbc;
package org.hongxi.whatsmars.shardingsphere;
import org.hongxi.whatsmars.shardingjdbc.service.DemoService;
import org.hongxi.whatsmars.shardingsphere.service.DemoService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
......
package org.hongxi.whatsmars.shardingjdbc.repository;
package org.hongxi.whatsmars.shardingsphere.repository;
import org.hongxi.whatsmars.shardingjdbc.entity.OrderItem;
import org.hongxi.whatsmars.shardingsphere.entity.OrderItem;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
......
package org.hongxi.whatsmars.shardingjdbc.repository;
package org.hongxi.whatsmars.shardingsphere.repository;
import org.hongxi.whatsmars.shardingjdbc.entity.Order;
import org.hongxi.whatsmars.shardingsphere.entity.Order;
import org.apache.ibatis.annotations.Mapper;
@Mapper
......
package org.hongxi.whatsmars.shardingjdbc.service;
package org.hongxi.whatsmars.shardingsphere.service;
import org.hongxi.whatsmars.shardingjdbc.entity.Order;
import org.hongxi.whatsmars.shardingjdbc.entity.OrderItem;
import org.hongxi.whatsmars.shardingjdbc.repository.OrderItemRepository;
import org.hongxi.whatsmars.shardingjdbc.repository.OrderRepository;
import org.hongxi.whatsmars.shardingsphere.entity.Order;
import org.hongxi.whatsmars.shardingsphere.entity.OrderItem;
import org.hongxi.whatsmars.shardingsphere.repository.OrderItemRepository;
import org.hongxi.whatsmars.shardingsphere.repository.OrderRepository;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.hongxi.whatsmars.shardingjdbc.repository.OrderItemRepository">
<resultMap id="baseResultMap" type="org.hongxi.whatsmars.shardingjdbc.entity.OrderItem">
<mapper namespace="org.hongxi.whatsmars.shardingsphere.repository.OrderItemRepository">
<resultMap id="baseResultMap" type="org.hongxi.whatsmars.shardingsphere.entity.OrderItem">
<result column="order_item_id" property="orderItemId" jdbcType="INTEGER"/>
<result column="order_id" property="orderId" jdbcType="INTEGER"/>
<result column="user_id" property="userId" jdbcType="INTEGER"/>
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.hongxi.whatsmars.shardingjdbc.repository.OrderRepository">
<mapper namespace="org.hongxi.whatsmars.shardingsphere.repository.OrderRepository">
<update id="createIfNotExistsTable">
CREATE TABLE IF NOT EXISTS t_order (order_id BIGINT AUTO_INCREMENT, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id));
</update>
......
......@@ -7,7 +7,7 @@
<!--<setting name="logImpl" value="STDOUT_LOGGING" />-->
<!--</settings>-->
<typeAliases>
<package name="org.hongxi.whatsmars.shardingjdbc.entity"/>
<package name="org.hongxi.whatsmars.shardingsphere.entity"/>
</typeAliases>
<mappers>
<mapper resource="META-INF/mappers/OrderMapper.xml"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property name="log.context.name" value="whatsmars-sharding-jdbc" />
<property name="log.context.name" value="whatsmars-shardingsphere" />
<property name="log.charset" value="UTF-8" />
<property name="log.pattern" value="[%-5level] %date --%thread-- [%logger] %msg %n" />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册