Commit f9402fac by ethanlamzs

1、利用spring_boot fat jar的方式启动

2、利用以下的方式加载业务于 sharding-jdbc的模块
Object[] starts = new Object[3];
starts[0] = SpringBootDataMybatisMain.class;
SpringApplication.run(starts, args);

还是测试阶段的验证
1 parent 80096380
Showing 23 changed files with 706 additions and 9 deletions
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.zhzf.fpj.xcx</groupId>
<artifactId>core-buiness-demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>demo-dao</artifactId>
<name>demo-dao</name>
<description>demo-dao </description>
<packaging>jar</packaging>
<dependencies>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
/*
* Copyright 1999-2015 dangdang.com.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* </p>
*/
package com.zhzf.fpj.xcx.demo.mybatis;
import com.zhzf.fpj.xcx.demo.mybatis.service.DemoService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.PropertySource;
@SpringBootApplication
//@PropertySource(ignoreResourceNotFound=true,value="classpath:application-dao.properties")
public class SpringBootDataMybatisMain {
// CHECKSTYLE:OFF
public static void main(final String[] args) {
// CHECKSTYLE:ON
ApplicationContext applicationContext = SpringApplication.run(SpringBootDataMybatisMain.class, args);
applicationContext.getBean(DemoService.class).demo();
}
}
/*
* Copyright 1999-2015 dangdang.com.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* </p>
*/
package com.zhzf.fpj.xcx.demo.mybatis.entity;
public final class Order {
private long orderId;
private int userId;
private String status;
public long getOrderId() {
return orderId;
}
public void setOrderId(final long orderId) {
this.orderId = orderId;
}
public int getUserId() {
return userId;
}
public void setUserId(final int userId) {
this.userId = userId;
}
public String getStatus() {
return status;
}
public void setStatus(final String status) {
this.status = status;
}
@Override
public String toString() {
return String.format("order_id: %s, user_id: %s, status: %s", orderId, userId, status);
}
}
/*
* Copyright 1999-2015 dangdang.com.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* </p>
*/
package com.zhzf.fpj.xcx.demo.mybatis.entity;
public final class OrderItem {
private long orderItemId;
private long orderId;
private int userId;
private String status;
public long getOrderItemId() {
return orderItemId;
}
public void setOrderItemId(final long orderItemId) {
this.orderItemId = orderItemId;
}
public long getOrderId() {
return orderId;
}
public void setOrderId(final long orderId) {
this.orderId = orderId;
}
public int getUserId() {
return userId;
}
public void setUserId(final int userId) {
this.userId = userId;
}
public String getStatus() {
return status;
}
public void setStatus(final String status) {
this.status = status;
}
@Override
public String toString() {
return String.format("item_id:%s, order_id: %s, user_id: %s, status: %s", orderItemId, orderId, userId, status);
}
}
/*
* Copyright 1999-2015 dangdang.com.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* </p>
*/
package com.zhzf.fpj.xcx.demo.mybatis.repository;
import com.zhzf.fpj.xcx.demo.mybatis.entity.OrderItem;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface OrderItemRepository {
void createIfNotExistsTable();
void truncateTable();
Long insert(OrderItem model);
void delete(Long orderItemId);
List<OrderItem> selectAll();
void dropTable();
}
/*
* Copyright 1999-2015 dangdang.com.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* </p>
*/
package com.zhzf.fpj.xcx.demo.mybatis.repository;
import com.zhzf.fpj.xcx.demo.mybatis.entity.Order;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface OrderRepository {
void createIfNotExistsTable();
void truncateTable();
Long insert(Order model);
void delete(Long orderId);
void dropTable();
}
/*
* Copyright 1999-2015 dangdang.com.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* </p>
*/
package com.zhzf.fpj.xcx.demo.mybatis.service;
import com.zhzf.fpj.xcx.demo.mybatis.entity.Order;
import com.zhzf.fpj.xcx.demo.mybatis.entity.OrderItem;
import com.zhzf.fpj.xcx.demo.mybatis.repository.OrderItemRepository;
import com.zhzf.fpj.xcx.demo.mybatis.repository.OrderRepository;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
@Service
public class DemoService {
@Resource
private OrderRepository orderRepository;
@Resource
private OrderItemRepository orderItemRepository;
public void demo() {
orderRepository.createIfNotExistsTable();
orderItemRepository.createIfNotExistsTable();
orderRepository.truncateTable();
orderItemRepository.truncateTable();
List<Long> orderIds = new ArrayList<Long>(10);
System.out.println("1.Insert--------------");
for (int i = 0; i < 100; i++) {
Order order = new Order();
order.setUserId(i);
order.setStatus("INSERT_TEST");
orderRepository.insert(order);
long orderId = order.getOrderId();
orderIds.add(orderId);
OrderItem item = new OrderItem();
item.setOrderId(orderId);
item.setUserId(i);
item.setStatus("INSERT_TEST");
orderItemRepository.insert(item);
}
System.out.println(orderItemRepository.selectAll());
System.out.println("2.Delete--------------");
for (Long each : orderIds) {
//orderRepository.delete(each);
//orderItemRepository.delete(each);
}
System.out.println(orderItemRepository.selectAll());
//orderItemRepository.dropTable();
//orderRepository.dropTable();
}
}
<?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="com.zhzf.fpj.xcx.demo.mybatis.repository.OrderItemRepository">
<resultMap id="baseResultMap" type="com.zhzf.fpj.xcx.demo.mybatis.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"/>
<result column="status" property="status" jdbcType="VARCHAR"/>
</resultMap>
<update id="createIfNotExistsTable">
CREATE TABLE IF NOT EXISTS t_order_item (order_item_id BIGINT AUTO_INCREMENT, order_id BIGINT, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_item_id));
</update>
<update id="truncateTable">
TRUNCATE TABLE t_order_item;
</update>
<update id="dropTable">
DROP TABLE IF EXISTS t_order_item;
</update>
<insert id="insert" useGeneratedKeys="true" keyProperty="orderItemId">
INSERT INTO t_order_item (
order_id, user_id, status
)
VALUES (
#{orderId,jdbcType=INTEGER},
#{userId,jdbcType=INTEGER},
#{status,jdbcType=VARCHAR}
)
</insert>
<delete id="delete">
DELETE FROM t_order_item WHERE order_id = #{orderId,jdbcType=INTEGER}
</delete>
<select id="selectAll" resultMap="baseResultMap">
SELECT
i.*
FROM
t_order o, t_order_item i
WHERE
o.order_id = i.order_id
</select>
</mapper>
<?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="com.zhzf.fpj.xcx.demo.mybatis.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>
<update id="truncateTable">
TRUNCATE TABLE t_order;
</update>
<update id="dropTable">
DROP TABLE IF EXISTS t_order;
</update>
<insert id="insert" useGeneratedKeys="true" keyProperty="orderId">
INSERT INTO t_order (
user_id, status
)
VALUES (
#{userId,jdbcType=INTEGER},
#{status,jdbcType=VARCHAR}
)
</insert>
<delete id="delete">
DELETE FROM t_order WHERE order_id = #{orderId,jdbcType=INTEGER}
</delete>
</mapper>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<!--<settings>-->
<!--<setting name="logImpl" value="STDOUT_LOGGING" />-->
<!--</settings>-->
<typeAliases>
<package name="com.zhzf.fpj.xcx.demo.mybatis.entity"/>
</typeAliases>
<mappers>
<mapper resource="META-INF/mappers/OrderMapper.xml"/>
<mapper resource="META-INF/mappers/OrderItemMapper.xml"/>
</mappers>
</configuration>
sharding.jdbc.datasource.names=ds_0,ds_1
sharding.jdbc.datasource.ds_0.type=com.alibaba.druid.pool.DruidDataSource
sharding.jdbc.datasource.ds_0.driver-class-name=com.mysql.jdbc.Driver
sharding.jdbc.datasource.ds_0.url=jdbc:mysql://115.28.171.4:3306/demo_ds_0
sharding.jdbc.datasource.ds_0.username=root
sharding.jdbc.datasource.ds_0.password=123456
sharding.jdbc.datasource.ds_1.type=com.alibaba.druid.pool.DruidDataSource
sharding.jdbc.datasource.ds_1.driver-class-name=com.mysql.jdbc.Driver
sharding.jdbc.datasource.ds_1.url=jdbc:mysql://115.28.171.4:3306/demo_ds_1
sharding.jdbc.datasource.ds_1.username=root
sharding.jdbc.datasource.ds_1.password=123456
sharding.jdbc.config.sharding.default-database-strategy.inline.sharding-column=user_id
sharding.jdbc.config.sharding.default-database-strategy.inline.algorithm-expression=ds_${user_id % 2}
sharding.jdbc.config.sharding.tables.t_order.actual-data-nodes=ds_${0..1}.t_order_${0..1}
sharding.jdbc.config.sharding.tables.t_order.table-strategy.inline.sharding-column=order_id
sharding.jdbc.config.sharding.tables.t_order.table-strategy.inline.algorithm-expression=t_order_${order_id % 2}
sharding.jdbc.config.sharding.tables.t_order.key-generator-column-name=order_id
sharding.jdbc.config.sharding.tables.t_order_item.actual-data-nodes=ds_${0..1}.t_order_item_${0..1}
sharding.jdbc.config.sharding.tables.t_order_item.table-strategy.inline.sharding-column=order_id
sharding.jdbc.config.sharding.tables.t_order_item.table-strategy.inline.algorithm-expression=t_order_item_${order_id % 2}
sharding.jdbc.config.sharding.tables.t_order_item.key-generator-column-name=order_item_id
spring.jpa.properties.hibernate.hbm2ddl.auto=create
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
#spring.jpa.properties.hibernate.show_sql=true
mybatis.config-location=classpath:META-INF/mybatis-config.xml
spring.profiles.active=sharding
#spring.profiles.active=sharding-db
#spring.profiles.active=sharding-tbl
#spring.profiles.active=masterslave
#spring.profiles.active=sharding-masterslave
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.zhzf.fpj.xcx</groupId>
<artifactId>core-buiness-demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>demo-service</artifactId>
<name>demo-service</name>
<description>demo-service </description>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.zhzf.fpj.xcx</groupId>
<artifactId>demo-dao</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package com.zhzf.fpj.xcx.demo.service;
import com.zhzf.fpj.xcx.demo.mybatis.service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class DemoServiceIn {
@Autowired(required = false)
private DemoService demoService;
public void testExecute(String appfrom){
System.out.println("#######testExecute ["+ appfrom+"] #########");
demoService.demo();
}
}
package com.zhzf.fpj.xcx.demo.service;
import com.zhzf.fpj.xcx.demo.mybatis.SpringBootDataMybatisMain;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication
//@ComponentScan("com.zhzf.fpj.xcx.demo")
public class SpringBootDataServiceMain {
// CHECKSTYLE:OFF
public static void main(final String[] args) {
// CHECKSTYLE:ON
Object[] starts = new Object[2];
starts[0] = SpringBootDataMybatisMain.class;
starts[1] = SpringBootDataServiceMain.class;
ApplicationContext applicationContext = SpringApplication.run(starts, args);
//ApplicationContext applicationContext = SpringApplication.run(com.zhzf.fpj.xcx.demo.service.SpringBootDataServiceMain.class, args);
//applicationContext.getBean(DemoServiceIn.class).testExecute();
}
}
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.zhzf.fpj.xcx</groupId>
<artifactId>core-buiness</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>core-buiness-demo</artifactId>
<name>core-buiness</name>
<description>core-buiness-demo 业务代码的输出 </description>
<packaging>pom</packaging>
<modules>
<module>demo-service</module>
<module>demo-dao</module>
</modules>
<dependencies>
</dependencies>
</project>
\ No newline at end of file
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.zhzf.fpj.xcx</groupId>
<artifactId>fpj-xcx</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>core-buiness</artifactId>
<name>core-buiness</name>
<description>core-buiness 业务代码的输出 </description>
<packaging>pom</packaging>
<modules>
<module>core-buiness-demo</module>
</modules>
<dependencies>
<dependency>
<groupId>io.shardingjdbc</groupId>
<artifactId>sharding-jdbc-core-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP-java7</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
......@@ -19,6 +19,18 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.zhzf.fpj.xcx</groupId>
<artifactId>demo-service</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.zhzf.fpj.xcx</groupId>
<artifactId>demo-dao</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
......@@ -26,6 +38,13 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
......
package com.zhzf.fpj.xcx.bootstart;
import com.zhzf.fpj.xcx.demo.mybatis.SpringBootDataMybatisMain;
import com.zhzf.fpj.xcx.demo.service.SpringBootDataServiceMain;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
......@@ -8,7 +10,11 @@ public class ServiceBootStartApplication {
public static void main(String[] args) {
SpringApplication.run(ServiceBootStartApplication.class, args);
Object[] starts = new Object[3];
starts[0] = SpringBootDataMybatisMain.class;
starts[1] = SpringBootDataServiceMain.class;
starts[2] = ServiceBootStartApplication.class;
SpringApplication.run(starts, args);
try {
System.in.read();
} catch (Exception e) {
......
......@@ -2,6 +2,8 @@ package com.zhzf.fpj.xcx.service;
import com.alibaba.dubbo.config.annotation.Service;
import com.zhzf.fpj.xcx.demo.DemoService;
import com.zhzf.fpj.xcx.demo.service.DemoServiceIn;
import org.springframework.beans.factory.annotation.Autowired;
@Service(
version = "1.0.0",
......@@ -11,7 +13,11 @@ import com.zhzf.fpj.xcx.demo.DemoService;
)
public class TestDemoService implements DemoService {
@Autowired(required = false)
private DemoServiceIn demoServiceIn;
public String sayHello(String name) {
demoServiceIn.testExecute("core-service-demo");
return "Hello, " + name + " (from Spring Boot)";
}
......
......@@ -41,6 +41,24 @@
<artifactId>junit</artifactId>
</dependency>
<!--持久化层-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP-java7</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
......@@ -14,7 +14,7 @@ public class DemoConsumerController {
@Reference(version = "1.0.0",
application = "${dubbo.application.id}",
url = "dubbo://localhost:12345",check = false)
url = "dubbo://localhost:12345",check = false,timeout = 60000 )
private DemoService demoService;
@RequestMapping("/sayHello")
......
......@@ -16,6 +16,7 @@
<!--module>core-domains</module-->
<module>core-services</module>
<module>core-webs</module>
<module>core-business</module>
</modules>
......@@ -23,8 +24,19 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring.boot.version>1.3.0.RELEASE</spring.boot.version>
<!--base层-->
<spring.boot.version>1.5.0.RELEASE</spring.boot.version>
<dubbo.spring.boot.version>0.1.1</dubbo.spring.boot.version>
<!--持久化层相关的-->
<sharding-jdbc.version>2.0.3</sharding-jdbc.version>
<mybatis.version>3.4.2</mybatis.version>
<mybatis-spring.version>1.3.0</mybatis-spring.version>
<hikari-cp.version>2.4.11</hikari-cp.version>
<mysql-connector-java.version>5.1.30</mysql-connector-java.version>
<mybatis-spring.version>1.3.0</mybatis-spring.version>
<druid_version>1.0.12</druid_version>
</properties>
<dependencyManagement>
......@@ -50,12 +62,6 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator</artifactId>
<version>${spring.boot.version}</version>
</dependency>
......@@ -72,6 +78,39 @@
<version>4.12</version>
</dependency>
<!--持久化层相关-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql-connector-java.version}</version>
</dependency>
<dependency>
<groupId>io.shardingjdbc</groupId>
<artifactId>sharding-jdbc-core-spring-boot-starter</artifactId>
<version>${sharding-jdbc.version}</version>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP-java7</artifactId>
<version>${hikari-cp.version}</version>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis-spring.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>${druid_version}</version>
</dependency>
</dependencies>
</dependencyManagement>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!