Commit bed82f46 胡敏

aaa

0 个父辈
正在显示 37 个修改的文件 包含 1686 行增加0 行删除
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>vertx-demo</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
encoding//src/main/resources/my/index.html=UTF-8
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>test</title>
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container" role="main">
<div class="page-header">
<div class="row">
<div class="col-md-12">
<h1>Users List</h1>
<button class="pull-right btn btn-primary product-add" data-action="add" data-toggle="modal"
data-target="#productModal">
<span class="glyphicon glyphicon-plus"></span> Add
</button>
<table class="table table-striped">
<thead>
<tr>
<th>id</th>
<th>Name</th>
<th>Actions</th>
</tr>
</thead>
<tbody id="content">
<!-- filled using Ajax -->
</tbody>
</table>
</div>
</div>
</div>
</div>
<script>
$(function () {
load();
initModal();
});
function create(name) {
$.post("/api/user", JSON.stringify({name: name}), function () {
load();
}, "json");
}
function remove(id) {
$.ajax({
method: "DELETE",
url: "/api/user/" + id
}).done(function () {
load();
});
}
function update(id, name, origin) {
$.ajax({
method: "PUT",
url: "/api/user",
data: JSON.stringify({id:id,name: name})
}).done(function () {
load();
});
}
function load() {
$("#content").children().remove();
$.getJSON("/api/user/list", function (data) {
$.each(data, function (key, val) {
$("<tr><td>" + val.id + "</td><td>" + val.name + "</td>" +
"<td>" +
"<button data-action='edit' class='btn btn-primary btn-sm product-edit' " +
"data-toggle='modal' " +
"data-target='#productModal' " +
"data-name='" + val.name + "' " +
"data-id='" + val.id + "'>" +
"<span class='glyphicon glyphicon-pencil'></span>" +
"</button>" +
"&nbsp;" +
"<button class='btn btn-danger btn-sm product-delete' data-id='" + val.id + "'>" +
" <span class='glyphicon glyphicon-minus'></span>" +
"</button>" +
"</td>" +
"</tr>").appendTo("#content");
});
initCallbacks();
});
}
function initCallbacks() {
$(".product-delete").unbind().click(function() {
var id = $(this).data("id");
remove(id);
});
}
function initModal() {
$("#productModal").on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
var action = button.data('action');
var id = button.data('id');
var productAction = $("#productAction");
productAction.unbind();
var modal = $(this);
if (action === "add") {
modal.find('.modal-title').text("Add a bottle");
modal.find('#product-name').val("");
modal.find('#product-origin').val("");
productAction.click(function () {
create($("#product-name").val());
$('#productModal').modal('toggle');
});
} else {
modal.find('.modal-title').text("Edit a bottle");
modal.find('#product-name').val(button.data("name"));
modal.find('#product-origin').val(button.data("origin"));
productAction.click(function () {
update(id, $("#product-name").val());
$('#productModal').modal('toggle');
});
}
})
}
</script>
<div class="modal fade" id="productModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
<h4 class="modal-title" id="productModalTitle">Add</h4>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="product-name" class="control-label">Name:</label>
<input type="text" class="form-control" id="product-name">
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" id="productAction" class="btn btn-primary">Save</button>
</div>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
{
"test" : "1111"
}
<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>
<groupId>com.xxxcom.xxxproduct</groupId>
<artifactId>xxx-srv</artifactId>
<version>1.0.0-SNAPSHOT</version>
<properties>
<!-- the main verticle class name -->
<main.verticle>com.xxxcom.xxxproduct.XXXSrv</main.verticle>
<vertx.version>3.4.2</vertx.version>
</properties>
<dependencies>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-core</artifactId>
<version>${vertx.version}</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-hazelcast</artifactId>
<version>${vertx.version}</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-web</artifactId>
<version>${vertx.version}</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-redis-client</artifactId>
<version>${vertx.version}</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-mysql-postgresql-client</artifactId>
<version>3.5.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.8</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.23</version>
</dependency>
<!-- tag::db-deps[] -->
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-jdbc-client</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901.jdbc4</version>
</dependency>
<!-- end::db-deps[] -->
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-mongo-service</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-config</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.2</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<!-- We specify the Maven compiler plugin as we need to set it to Java
1.8 -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<!-- You only need the part below if you want to build your application
into a fat executable jar. This is a jar that contains all the dependencies
required to run it, so you can just run it with java -jar -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>io.vertx.core.Launcher</Main-Class>
<Main-Verticle>${main.verticle}</Main-Verticle>
</manifestEntries>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/services/io.vertx.core.spi.VerticleFactory</resource>
</transformer>
</transformers>
<artifactSet>
</artifactSet>
<outputFile>${project.build.directory}/${project.artifactId}-${project.version}-fat.jar</outputFile>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<id>run</id>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>io.vertx.core.Launcher</mainClass>
<arguments>
<argument>run</argument>
<argument>${main.verticle}</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>run-app</id>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-jar</argument>
<argument>target/${project.artifactId}-${project.version}-fat.jar</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>staging</id>
<repositories>
<repository>
<id>staging</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
</repositories>
</profile>
</profiles>
</project>
\ No newline at end of file
微服务开发流程
1. 开发环境准备
JDK 1.8+
maven 3.3+
2. 新建微服务
微服务类继承AbstractVerticle基础类,实现load、unload(可选)方法、在load方法中注册各种服务。
通过vertx.eventBus方法获取消息总线实例,实现消息监听或消息发送。
示例代码:
3. 程序打包
设置pom.xml /project/properties/路径下main.verticle的值为微服务实现类,如:
<main.verticle>com.xxxcom.xxxproduct.XXXSrv</main.verticle>
执行mvn clean package 进行打包
4. 程序运行
java -jar <你的微服务jar包>
集群模式 java -jar <你的微服务jar包> -cluster
集群多实例模式 java -jar <你的微服务jar包> -cluster -instance 4
注意:应运行肥包
5. 注意事项
如需要执行阻塞IO的相关操作,如BIO网络请求、文件读取等,需包含在vertx.executeBlocking里
不提倡自行创建新线程
基于JVM、轻量级、高性能的应用平台
\ No newline at end of file
package com.xxxcom.model;
import java.util.concurrent.atomic.AtomicInteger;
public class Users {
private static final AtomicInteger COUNTER = new AtomicInteger(1);
private final Integer id;
public Integer getId() {
return id;
}
public Users() {
this.id = COUNTER.getAndIncrement();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
private String name;
public Users(String name) {
this.id = COUNTER.getAndIncrement();
this.name = name;
}
}
package com.xxxcom.model.vo;
import io.vertx.core.json.JsonObject;
public class Msg_Vo {
private int code;
private String msg;
private Object data;
private int total;
public Msg_Vo(int code, Object data) {
this.code = code;
this.data = data;
}
public Msg_Vo(int code, String msg) {
this.code = code;
this.msg = msg;
}
public Msg_Vo(int code, Object data, String msg) {
this(code, data);
this.data = data;
this.msg = msg;
}
public Msg_Vo(int code, Object data, int total) {
this(code, data);
this.total = total;
}
}
package com.xxxcom.util;
import io.vertx.core.Vertx;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.file.FileSystem;
import io.vertx.core.json.JsonObject;
public class FileUtil {
private static String content="";
//读取文件
public String readFile(Vertx vertx,String filepath) {
FileSystem system=vertx.fileSystem().readFile(filepath, result -> {
if (result.succeeded()) {
System.out.println("aaa:"+result.result().toString());
} else {
System.err.println("Oh oh ..." + result.cause());
}
});
System.out.println("content:"+content);
return content;
}
}
package com.xxxcom.util;
import com.xxxcom.model.vo.Msg_Vo;
import io.vertx.config.ConfigRetriever;
import io.vertx.config.ConfigRetrieverOptions;
import io.vertx.config.ConfigStoreOptions;
import io.vertx.core.Future;
import io.vertx.core.Vertx;
import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.asyncsql.AsyncSQLClient;
import io.vertx.ext.asyncsql.PostgreSQLClient;
import io.vertx.ext.sql.SQLConnection;
public class JDBCUtil {
private static AsyncSQLClient client;
// 获取连接字符串
private Future<JsonObject> getSqlStr() {
Vertx vertx = Vertx.vertx();
Future<JsonObject> future = Future.future();
ConfigStoreOptions fileStore = new ConfigStoreOptions().setType("file")
.setConfig(new JsonObject().put("path", "config/dbconfig.json"));
ConfigRetrieverOptions options = new ConfigRetrieverOptions().addStore(fileStore);
ConfigRetriever retriever = ConfigRetriever.create(vertx, options);
retriever.getConfig(ar -> {
if (ar.failed()) {
// Failed to retrieve the configuration
} else {
JsonObject config = ar.result();
future.complete(config);
}
});
return future;
}
public AsyncSQLClient getClient(Vertx vertx) {
if (client == null) {
// 获取配置文件连接信息
client = PostgreSQLClient.createShared(vertx,
new JsonObject().put("host", "120.76.158.63").put("port", 5432).put("database", "iot")
.put("maxPoolSize", 10).put("username", "postgres").put("charset", "UTF-8")
.put("password", "Nmamtf_098"));
}
System.out.println("client:" + client);
return client;
}
/**
* 获取数据库连接
*
* @param vertx
* @return
*/
public Future<SQLConnection> getConnection(Vertx vertx) {
Future<SQLConnection> future = Future.future();
AsyncSQLClient client = getClient(vertx);
client.getConnection(conn -> {
if (conn.succeeded()) {
SQLConnection connresult = conn.result();
System.out.println("connresult:" + connresult);
future.complete(connresult);
} else {
future.fail(conn.cause());
}
});
System.out.println("future:" + future);
return future;
}
// 查询
public Future<Msg_Vo> query(Vertx vertx,String sql,JsonArray params){
Future<Msg_Vo> future = Future.future();
getConnection(vertx).setHandler(result->{
SQLConnection conn=result.result();
conn.queryWithParams(sql, params, query->{
if (query.succeeded()) {
JsonArray arr = new JsonArray();
query.result().getRows().forEach(arr::add);
future.complete(new Msg_Vo(0, arr.encode()));
} else {
future.fail(query.cause());
}
});
});
return future;
}
}
package com.xxxcom.xxxproduct;
import com.mongodb.MongoCommandException;
import io.vertx.core.AbstractVerticle;
import io.vertx.core.Vertx;
import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.asyncsql.AsyncSQLClient;
import io.vertx.ext.asyncsql.PostgreSQLClient;
import io.vertx.ext.jdbc.JDBCClient;
import io.vertx.ext.sql.SQLConnection;
public class JDBCExample extends AbstractVerticle {
public JDBCExample(){
vertx=Vertx.vertx();
}
@Override
public void start() throws Exception {
final AsyncSQLClient client = PostgreSQLClient.createShared(vertx, new JsonObject()
.put("url", "jdbc:postgresql://120.76.158.62:5432/iot")
.put("driver_class", "org.postgresql.Driver")
.put("max_pool_size",10)
.put("username", "postgres")
.put("password", "Nmamtf_com"));
client.getConnection(conn -> {
if (conn.failed()) {
System.err.println(conn.cause().getMessage());
return;
}
final SQLConnection connection = conn.result();
connection.execute("create table test(id int primary key, name varchar(255))", res -> {
if (res.failed()) {
throw new RuntimeException(res.cause());
}
// insert some test data
connection.execute("insert into test values(1, 'Hello')", insert -> {
// query some data
connection.query("select * from test", rs -> {
for (JsonArray line : rs.result().getResults()) {
System.out.println(line.encode());
}
// and close the connection
connection.close(done -> {
if (done.failed()) {
throw new RuntimeException(done.cause());
}
});
});
});
});
});
}
public static void main(String[] args) {
}
}
package com.xxxcom.xxxproduct;
import io.vertx.core.Future;
import io.vertx.core.Vertx;
public class Main {
public static void main(String[] args) {
XXXSrv jdbc=new XXXSrv();
try {
jdbc.start();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
package com.xxxcom.xxxproduct;
import io.vertx.core.AbstractVerticle;
import io.vertx.core.http.HttpServerResponse;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.jdbc.JDBCClient;
import io.vertx.ext.web.Router;
public class MyFirstVerticle extends AbstractVerticle {
@Override
public void start() throws Exception {
Router router = Router.router(vertx);
// Bind "/" to our hello message - so we are still compatible.
router.route("/").handler(routingContext -> {
HttpServerResponse response = routingContext.response();
response.putHeader("content-type", "text/html;charset=UTF-8")
.end("<h1>Hello from my first Vert.x 3 application</h1>");
});
}
}
package com.xxxcom.xxxproduct;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.xxxcom.model.vo.Msg_Vo;
import com.xxxcom.util.JDBCUtil;
import io.vertx.core.AbstractVerticle;
import io.vertx.core.Future;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpServerResponse;
import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.sql.SQLConnection;
import io.vertx.ext.web.Router;
import io.vertx.ext.web.RoutingContext;
import io.vertx.ext.web.handler.BodyHandler;
import io.vertx.ext.web.handler.StaticHandler;
public class XXXSrv extends AbstractVerticle {
public XXXSrv() {
vertx = Vertx.vertx();
}
JDBCUtil jdbc =new JDBCUtil();
@Override
public void start() throws Exception {
/*
* EventBus eb = vertx.eventBus(); eb.consumer("abc", // 这个是微服务监听地址(功能号)
* r -> { // 处理函数 try {
*
* JsonObject request = (JsonObject) r.body(); // 微服务之间通信采用JSON String
* param1 = request.getString("param1"); // 这里获取参数 String param2 =
* request.getString("param2");
*
* r.reply(makeReply(0, "", "world")); } catch (Exception e) {
* r.reply(makeReply(-1, "未知错误", null)); }
*
* });
*/
/*
* System.out.println("begin"); final JDBCClient client =
* JDBCClient.createShared(vertx, new JsonObject().put("url",
* "jdbc:postgresql://120.76.158.63:5432/iot") .put("driver_class",
* "org.postgresql.Driver") .put("max_pool_size", 10).put("username",
* "postgres") .put("password", "Nmamtf_098"));
*
* client.getConnection(conn -> { if (conn.failed()) {
* System.out.println("1111");
* System.err.println(conn.cause().getMessage()); return; }
* System.out.println(12223); final SQLConnection connection =
* conn.result(); connection.execute(
* "create table test(id int primary key, name varchar(255))", res -> {
* if (res.failed()) { throw new RuntimeException(res.cause()); } //
* insert some test data connection.execute(
* "insert into test values(1, 'Hello')", insert -> { // query some data
* connection.query("select * from test", rs -> { for (JsonArray line :
* rs.result().getResults()) { System.out.println(line.encode()); }
*
* // and close the connection connection.close(done -> { if
* (done.failed()) { throw new RuntimeException(done.cause()); } }); });
* }); }); });
*/
}
@Override
public void stop() throws Exception {
}
private JsonObject makeReply(int code, String msg, Object data) {
if (data == null) {
data = new JsonObject();
}
return new JsonObject().put("result", new JsonObject().put("code", code).put("msg", msg)).put("data", data);
}
public static void main(String[] args) {
// Create an HTTP server which simply returns "Hello World!" to each
// request.
Vertx.vertx().createHttpServer().requestHandler(req -> req.response().end("Hello World!")).listen(9090);
}
@Override
public void start(Future<Void> fut) {
Router router = Router.router(vertx);
// 页面访问地址
router.route("/my/*").handler(StaticHandler.create("my"));
vertx.createHttpServer().requestHandler(router::accept).listen(
// Retrieve the port from the configuration
config().getInteger("http.port", 8080), result -> {
if (result.succeeded()) {
fut.complete();
} else {
fut.fail(result.cause());
}
});
// 获取列表
//router.get("/api/getUsers").handler(this::getAll);
router.route("/api/user*").handler(BodyHandler.create());// 设置全局请求
// 获取列表
router.get("/api/user/list").handler(this::getAll);
// 添加
router.post("/api/user").handler(this::adduser);
// 修改
router.put("/api/user").handler(this::updateuser);
// 删除
router.delete("/api/user/:id").handler(this::deleteuser);
}
// 查询
private void getAll(RoutingContext routingContext) {
System.out.println("load in");
HttpServerResponse response = routingContext.response();
//JDBCUtil jdbc = new JDBCUtil();
/* jdbc.getConnection(vertx).setHandler(conn->{
if(conn.succeeded()){
SQLConnection conns=conn.result();
conns.query(" SELECT id,name FROM auth.test where deleted=false ", query -> {
System.out.println("quert:"+query.cause());
if (query.failed()) {
sendError(500, response);
} else {
JsonArray arr = new JsonArray();
query.result().getRows().forEach(arr::add);
System.out.println("quert success");
response.putHeader("content-type", "application/json").end(arr.encode());
}
});
}else{
System.out.println("fails");
sendError(500, response);
}
});*/
JsonArray array=new JsonArray();
jdbc.query(vertx, " SELECT id,name FROM auth.test where deleted=false ", array)
.setHandler(xx->{
Gson gs = new GsonBuilder()
.serializeNulls()
.create();
if(xx.succeeded()){
Msg_Vo msg=xx.result();
String res=gs.toJson(msg);
response.putHeader("content-type", "application/json").end(res);
}else{
Msg_Vo msg=new Msg_Vo(-1, "数据异常");
String res=gs.toJson(msg);
response.putHeader("content-type", "application/json").end(res);
}
});
}
// 删除
private void deleteuser(RoutingContext routingContext) {
String id = routingContext.request().getParam("id");
HttpServerResponse response = routingContext.response();
if (id == null) {
sendError(400, response);
} else {
JDBCUtil jdbc = new JDBCUtil();
jdbc.getConnection(vertx).setHandler(conn->{
SQLConnection conns=conn.result();
conns.queryWithParams("SELECT id,name FROM auth.test where id = ?", new JsonArray().add(Integer.parseInt(id)),
query -> {
if (query.failed()) {
sendError(500, response);
} else {
if (query.result().getNumRows() == 0) {
sendError(404, response);
} else {
conns.updateWithParams("update auth.test set deleted=true where id=? ",
new JsonArray().add(id), edit -> {
if (edit.failed()) {
sendError(500, routingContext.response());
} else {
routingContext.response().end();
}
});
}
}
});
});
}
}
// 添加
private void adduser(RoutingContext routingContext) {
/*
* final Users user = Json.decodeValue(routingContext.getBodyAsString(),
* Users.class); users.put(user.getId(), user);
* routingContext.response().setStatusCode(201).putHeader(
* "content-type", "application/json; charset=utf-8")
* .end(Json.encodePrettily(user));
*/
JsonObject user = routingContext.getBodyAsJson();
JDBCUtil jdbc = new JDBCUtil();
jdbc.getConnection(vertx).setHandler(conn->{
SQLConnection conns=conn.result();
conns.updateWithParams("INSERT INTO auth.test (name) VALUES (?)", new JsonArray().add(user.getString("name")),
query -> {
System.out.println("username:"+user.getString("name"));
if (query.failed()) {
sendError(500, routingContext.response());
} else {
routingContext.response().end();
}
});
});
}
private void sendError(int statusCode, HttpServerResponse response) {
response.setStatusCode(statusCode).end();
}
// 获取
private void getUser(RoutingContext routingContext) {
String id = routingContext.request().getParam("id");
HttpServerResponse response = routingContext.response();
if (id == null) {
sendError(400, response);
} else {
JDBCUtil jdbc = new JDBCUtil();
jdbc.getConnection(vertx).setHandler(conn->{
SQLConnection conns=conn.result();
conns.queryWithParams("SELECT id,name FROM test where id = ?", new JsonArray().add(Integer.parseInt(id)),
query -> {
if (query.failed()) {
sendError(500, response);
} else {
if (query.result().getNumRows() == 0) {
sendError(404, response);
} else {
response.putHeader("content-type", "application/json")
.end(query.result().getRows().get(0).encode());
}
}
});
});
}
}
// 修改
private void updateuser(RoutingContext routingContext) {
HttpServerResponse response = routingContext.response();
JsonObject user = routingContext.getBodyAsJson();
if (user == null || user.getInteger("id") == null) {
sendError(400, response);
} else {
int id = user.getInteger("id");
JDBCUtil jdbc = new JDBCUtil();
jdbc.getConnection(vertx).setHandler(conn->{
SQLConnection conns=conn.result();
conns.queryWithParams("SELECT id,name FROM auth.test where id = ?", new JsonArray().add(id), query -> {
if (query.failed()) {
sendError(500, response);
} else {
if (query.result().getNumRows() == 0) {
sendError(404, response);
} else {
conns.updateWithParams("update auth.test set name=? where id=? ",
new JsonArray().add(user.getString("name")).add(id), edit -> {
if (edit.failed()) {
sendError(500, routingContext.response());
} else {
routingContext.response().end();
}
});
}
}
});
});
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd">
<bean class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="localHost" value="192.168.204.32"/>
<!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
<!--
Ignite provides several options for automatic discovery that can be used
instead os static IP based discovery. For information on all options refer
to our documentation: http://apacheignite.readme.io/docs/cluster-config
-->
<!-- Multicast -->
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder"/>
<!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
<!--
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<property name="addresses">
<list>
&lt;!&ndash; In distributed environment, replace with actual host IP address. &ndash;&gt;
<value>127.0.0.1:47500..47509</value>
</list>
</property>
</bean>
-->
<!-- Uncomment S3 IP finder to enable Amazon S3 based discovery. -->
<!-- This IP Finder requires ignite-aws module in classpath. -->
<!--
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder">
<property name="awsCredentials">
<bean class="com.amazonaws.auth.BasicAWSCredentials">
<constructor-arg value="YOUR_ACCESS_KEY_ID" />
<constructor-arg value="YOUR_SECRET_ACCESS_KEY" />
</bean>
</property>
<property name="bucketName" value="YOUR_BUCKET_NAME_IP_FINDER"/>
</bean>
-->
<!-- Uncomment Google Storage IP finder to enable GCE based discovery. -->
<!-- This IP Finder requires ignite-gce module in classpath. -->
<!--
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.gce.TcpDiscoveryGoogleStorageIpFinder">
<property name="projectName" ref="YOUR_GOOGLE_PLATFORM_PROJECT_NAME"/>
<property name="bucketName" value="YOUR_BUCKET_NAME"/>
<property name="serviceAccountId" value="YOUR_SERVICE_ACCOUNT_ID"/>
<property name="serviceAccountP12FilePath" value="PATH_TO_YOUR_PKCS12_KEY"/>
</bean>
-->
<!-- Uncomment JClouds IP finder to enable generic cloud based discovery. -->
<!-- This IP Finder requires ignite-cloud module in classpath. -->
<!--
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.cloud.TcpDiscoveryCloudIpFinder">
<property name="provider" value="google-compute-engine"/>
<property name="identity" value="YOUR_SERVICE_ACCOUNT_EMAIL"/>
<property name="credentialPath" value="PATH_YOUR_PEM_FILE"/>
<property name="zones">
<list>
<value>us-central1-a</value>
<value>asia-east1-a</value>
</list>
</property>
</bean>
-->
<!-- Uncomment JDBC IP finder and configure data source to enable JDBC based discovery. -->
<!-- This IP Finder requires spring-jdbc and spring-tx modules in classpath. -->
<!--
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.jdbc.TcpDiscoveryJdbcIpFinder">
<property name="dataSource" ref="ds"/>
</bean>
<bean id="ds" class="some.Datasource">
...
</bean>
-->
</property>
</bean>
</property>
<!-- Allows encryption with SSL and TLS. For more details refer to https://apacheignite.readme.io/docs/ssltls -->
<!--
<property name="sslContextFactory">
<bean class="org.apache.ignite.ssl.SslContextFactory">
<property name="keyStoreFilePath" value="keystore/server.jks"/>
<property name="keyStorePassword" value="123456"/>
<property name="trustStoreFilePath" value="keystore/trust.jks"/>
<property name="trustStorePassword" value="123456"/>
<property name="setProtocol" value="SSL"/>
</bean>
</property>
-->
<!-- Template cache configuration. -->
<property name="cacheConfiguration">
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="*"/>
<property name="cacheMode" value="PARTITIONED"/>
<property name="backups" value="1"/>
<property name="readFromBackup" value="false"/>
</bean>
</property>
<property name="includeEventTypes">
<list>
<util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_REMOVED"/>
</list>
</property>
<!-- Logging configuration. -->
<property name="gridLogger">
<bean class="org.apache.ignite.logger.java.JavaLogger">
<constructor-arg type="java.util.logging.Logger">
<bean class="java.util.logging.Logger">
<constructor-arg type="java.lang.String" value="global"/>
</bean>
</constructor-arg>
</bean>
</property>
<property name="metricsLogFrequency" value="0"/>
</bean>
</beans>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>test</title>
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container" role="main">
<div class="page-header">
<div class="row">
<div class="col-md-12">
<h1>Users List</h1>
<button class="pull-right btn btn-primary product-add" data-action="add" data-toggle="modal"
data-target="#productModal">
<span class="glyphicon glyphicon-plus"></span> Add
</button>
<table class="table table-striped">
<thead>
<tr>
<th>id</th>
<th>Name</th>
<th>Actions</th>
</tr>
</thead>
<tbody id="content">
<!-- filled using Ajax -->
</tbody>
</table>
</div>
</div>
</div>
</div>
<script>
$(function () {
load();
initModal();
});
function create(name) {
$.post("/api/user", JSON.stringify({name: name}), function () {
load();
}, "json");
}
function remove(id) {
$.ajax({
method: "DELETE",
url: "/api/user/" + id
}).done(function () {
load();
});
}
function update(id, name, origin) {
$.ajax({
method: "PUT",
url: "/api/user",
data: JSON.stringify({id:id,name: name})
}).done(function () {
load();
});
}
function load() {
$("#content").children().remove();
$.getJSON("/api/user/list", function (data) {
$.each(data, function (key, val) {
$("<tr><td>" + val.id + "</td><td>" + val.name + "</td>" +
"<td>" +
"<button data-action='edit' class='btn btn-primary btn-sm product-edit' " +
"data-toggle='modal' " +
"data-target='#productModal' " +
"data-name='" + val.name + "' " +
"data-id='" + val.id + "'>" +
"<span class='glyphicon glyphicon-pencil'></span>" +
"</button>" +
"&nbsp;" +
"<button class='btn btn-danger btn-sm product-delete' data-id='" + val.id + "'>" +
" <span class='glyphicon glyphicon-minus'></span>" +
"</button>" +
"</td>" +
"</tr>").appendTo("#content");
});
initCallbacks();
});
}
function initCallbacks() {
$(".product-delete").unbind().click(function() {
var id = $(this).data("id");
remove(id);
});
}
function initModal() {
$("#productModal").on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
var action = button.data('action');
var id = button.data('id');
var productAction = $("#productAction");
productAction.unbind();
var modal = $(this);
if (action === "add") {
modal.find('.modal-title').text("Add a bottle");
modal.find('#product-name').val("");
modal.find('#product-origin').val("");
productAction.click(function () {
create($("#product-name").val());
$('#productModal').modal('toggle');
});
} else {
modal.find('.modal-title').text("Edit a bottle");
modal.find('#product-name').val(button.data("name"));
modal.find('#product-origin').val(button.data("origin"));
productAction.click(function () {
update(id, $("#product-name").val());
$('#productModal').modal('toggle');
});
}
})
}
</script>
<div class="modal fade" id="productModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
<h4 class="modal-title" id="productModalTitle">Add</h4>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="product-name" class="control-label">Name:</label>
<input type="text" class="form-control" id="product-name">
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" id="productAction" class="btn btn-primary">Save</button>
</div>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
#
# Copyright 2014 Red Hat, Inc.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# and Apache License v2.0 which accompanies this distribution.
#
# The Eclipse Public License is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# The Apache License v2.0 is available at
# http://www.opensource.org/licenses/apache2.0.php
#
# You may elect to redistribute this code under either of these licenses.
#
handlers=java.util.logging.ConsoleHandler,java.util.logging.FileHandler
java.util.logging.SimpleFormatter.format=%5$s %6$s\n
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
java.util.logging.ConsoleHandler.level=FINEST
java.util.logging.FileHandler.level=INFO
java.util.logging.FileHandler.formatter=io.vertx.core.logging.impl.VertxLoggerFormatter
# Put the log in the system temporary directory
java.util.logging.FileHandler.pattern=%t/vertx.log
.level=INFO
io.vertx.ext.web.level=FINEST
io.vertx.level=INFO
org.apache.ignite.level=INFO
io.netty.util.internal.PlatformDependent.level=SEVERE
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd">
<bean class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="localHost" value="192.168.204.32"/>
<!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name="ipFinder">
<!--
Ignite provides several options for automatic discovery that can be used
instead os static IP based discovery. For information on all options refer
to our documentation: http://apacheignite.readme.io/docs/cluster-config
-->
<!-- Multicast -->
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder"/>
<!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
<!--
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
<property name="addresses">
<list>
&lt;!&ndash; In distributed environment, replace with actual host IP address. &ndash;&gt;
<value>127.0.0.1:47500..47509</value>
</list>
</property>
</bean>
-->
<!-- Uncomment S3 IP finder to enable Amazon S3 based discovery. -->
<!-- This IP Finder requires ignite-aws module in classpath. -->
<!--
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder">
<property name="awsCredentials">
<bean class="com.amazonaws.auth.BasicAWSCredentials">
<constructor-arg value="YOUR_ACCESS_KEY_ID" />
<constructor-arg value="YOUR_SECRET_ACCESS_KEY" />
</bean>
</property>
<property name="bucketName" value="YOUR_BUCKET_NAME_IP_FINDER"/>
</bean>
-->
<!-- Uncomment Google Storage IP finder to enable GCE based discovery. -->
<!-- This IP Finder requires ignite-gce module in classpath. -->
<!--
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.gce.TcpDiscoveryGoogleStorageIpFinder">
<property name="projectName" ref="YOUR_GOOGLE_PLATFORM_PROJECT_NAME"/>
<property name="bucketName" value="YOUR_BUCKET_NAME"/>
<property name="serviceAccountId" value="YOUR_SERVICE_ACCOUNT_ID"/>
<property name="serviceAccountP12FilePath" value="PATH_TO_YOUR_PKCS12_KEY"/>
</bean>
-->
<!-- Uncomment JClouds IP finder to enable generic cloud based discovery. -->
<!-- This IP Finder requires ignite-cloud module in classpath. -->
<!--
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.cloud.TcpDiscoveryCloudIpFinder">
<property name="provider" value="google-compute-engine"/>
<property name="identity" value="YOUR_SERVICE_ACCOUNT_EMAIL"/>
<property name="credentialPath" value="PATH_YOUR_PEM_FILE"/>
<property name="zones">
<list>
<value>us-central1-a</value>
<value>asia-east1-a</value>
</list>
</property>
</bean>
-->
<!-- Uncomment JDBC IP finder and configure data source to enable JDBC based discovery. -->
<!-- This IP Finder requires spring-jdbc and spring-tx modules in classpath. -->
<!--
<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.jdbc.TcpDiscoveryJdbcIpFinder">
<property name="dataSource" ref="ds"/>
</bean>
<bean id="ds" class="some.Datasource">
...
</bean>
-->
</property>
</bean>
</property>
<!-- Allows encryption with SSL and TLS. For more details refer to https://apacheignite.readme.io/docs/ssltls -->
<!--
<property name="sslContextFactory">
<bean class="org.apache.ignite.ssl.SslContextFactory">
<property name="keyStoreFilePath" value="keystore/server.jks"/>
<property name="keyStorePassword" value="123456"/>
<property name="trustStoreFilePath" value="keystore/trust.jks"/>
<property name="trustStorePassword" value="123456"/>
<property name="setProtocol" value="SSL"/>
</bean>
</property>
-->
<!-- Template cache configuration. -->
<property name="cacheConfiguration">
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="*"/>
<property name="cacheMode" value="PARTITIONED"/>
<property name="backups" value="1"/>
<property name="readFromBackup" value="false"/>
</bean>
</property>
<property name="includeEventTypes">
<list>
<util:constant static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_REMOVED"/>
</list>
</property>
<!-- Logging configuration. -->
<property name="gridLogger">
<bean class="org.apache.ignite.logger.java.JavaLogger">
<constructor-arg type="java.util.logging.Logger">
<bean class="java.util.logging.Logger">
<constructor-arg type="java.lang.String" value="global"/>
</bean>
</constructor-arg>
</bean>
</property>
<property name="metricsLogFrequency" value="0"/>
</bean>
</beans>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>test</title>
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container" role="main">
<div class="page-header">
<div class="row">
<div class="col-md-12">
<h1>Users List</h1>
<button class="pull-right btn btn-primary product-add" data-action="add" data-toggle="modal"
data-target="#productModal">
<span class="glyphicon glyphicon-plus"></span> Add
</button>
<table class="table table-striped">
<thead>
<tr>
<th>id</th>
<th>Name</th>
<th>Actions</th>
</tr>
</thead>
<tbody id="content">
<!-- filled using Ajax -->
</tbody>
</table>
</div>
</div>
</div>
</div>
<script>
$(function () {
load();
initModal();
});
function create(name) {
$.post("/api/user", JSON.stringify({name: name}), function () {
load();
}, "json");
}
function remove(id) {
$.ajax({
method: "DELETE",
url: "/api/user/" + id
}).done(function () {
load();
});
}
function update(id, name, origin) {
$.ajax({
method: "PUT",
url: "/api/user",
data: JSON.stringify({id:id,name: name})
}).done(function () {
load();
});
}
function load() {
$("#content").children().remove();
$.getJSON("/api/user/list", function (data) {
$.each(data, function (key, val) {
$("<tr><td>" + val.id + "</td><td>" + val.name + "</td>" +
"<td>" +
"<button data-action='edit' class='btn btn-primary btn-sm product-edit' " +
"data-toggle='modal' " +
"data-target='#productModal' " +
"data-name='" + val.name + "' " +
"data-id='" + val.id + "'>" +
"<span class='glyphicon glyphicon-pencil'></span>" +
"</button>" +
"&nbsp;" +
"<button class='btn btn-danger btn-sm product-delete' data-id='" + val.id + "'>" +
" <span class='glyphicon glyphicon-minus'></span>" +
"</button>" +
"</td>" +
"</tr>").appendTo("#content");
});
initCallbacks();
});
}
function initCallbacks() {
$(".product-delete").unbind().click(function() {
var id = $(this).data("id");
remove(id);
});
}
function initModal() {
$("#productModal").on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
var action = button.data('action');
var id = button.data('id');
var productAction = $("#productAction");
productAction.unbind();
var modal = $(this);
if (action === "add") {
modal.find('.modal-title').text("Add a bottle");
modal.find('#product-name').val("");
modal.find('#product-origin').val("");
productAction.click(function () {
create($("#product-name").val());
$('#productModal').modal('toggle');
});
} else {
modal.find('.modal-title').text("Edit a bottle");
modal.find('#product-name').val(button.data("name"));
modal.find('#product-origin').val(button.data("origin"));
productAction.click(function () {
update(id, $("#product-name").val());
$('#productModal').modal('toggle');
});
}
})
}
</script>
<div class="modal fade" id="productModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
<h4 class="modal-title" id="productModalTitle">Add</h4>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="product-name" class="control-label">Name:</label>
<input type="text" class="form-control" id="product-name">
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" id="productAction" class="btn btn-primary">Save</button>
</div>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
#
# Copyright 2014 Red Hat, Inc.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# and Apache License v2.0 which accompanies this distribution.
#
# The Eclipse Public License is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# The Apache License v2.0 is available at
# http://www.opensource.org/licenses/apache2.0.php
#
# You may elect to redistribute this code under either of these licenses.
#
handlers=java.util.logging.ConsoleHandler,java.util.logging.FileHandler
java.util.logging.SimpleFormatter.format=%5$s %6$s\n
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
java.util.logging.ConsoleHandler.level=FINEST
java.util.logging.FileHandler.level=INFO
java.util.logging.FileHandler.formatter=io.vertx.core.logging.impl.VertxLoggerFormatter
# Put the log in the system temporary directory
java.util.logging.FileHandler.pattern=%t/vertx.log
.level=INFO
io.vertx.ext.web.level=FINEST
io.vertx.level=INFO
org.apache.ignite.level=INFO
io.netty.util.internal.PlatformDependent.level=SEVERE
\ No newline at end of file
#Generated by Maven
#Fri Nov 17 17:17:10 CST 2017
version=1.0.0-SNAPSHOT
groupId=com.xxxcom.xxxproduct
artifactId=xxx-srv
com\xxxcom\xxxproduct\XXXSrv.class
com\xxxcom\xxxproduct\JDBCExample.class
com\xxxcom\model\Users.class
com\xxxcom\util\FileUtil.class
com\xxxcom\util\JDBCUtil.class
com\xxxcom\xxxproduct\MyFirstVerticle.class
com\xxxcom\model\vo\Msg_Vo.class
com\xxxcom\xxxproduct\Main.class
D:\javafiles\projects\wykjmv\vertx-demo\src\main\java\com\xxxcom\xxxproduct\JDBCExample.java
D:\javafiles\projects\wykjmv\vertx-demo\src\main\java\com\xxxcom\model\Users.java
D:\javafiles\projects\wykjmv\vertx-demo\src\main\java\com\xxxcom\xxxproduct\MyFirstVerticle.java
D:\javafiles\projects\wykjmv\vertx-demo\src\main\java\com\xxxcom\xxxproduct\Main.java
D:\javafiles\projects\wykjmv\vertx-demo\src\main\java\com\xxxcom\util\FileUtil.java
D:\javafiles\projects\wykjmv\vertx-demo\src\main\java\com\xxxcom\util\JDBCUtil.java
D:\javafiles\projects\wykjmv\vertx-demo\src\main\java\com\xxxcom\xxxproduct\XXXSrv.java
D:\javafiles\projects\wykjmv\vertx-demo\src\main\java\com\xxxcom\model\vo\Msg_Vo.java
此文件太大,无法显示。
此文件类型无法预览
Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
请先完成此消息的编辑!