postgres-db
所属分类:PostgreSQL
开发工具:HTML
文件大小:13487KB
下载次数:0
上传日期:2016-11-04 12:57:19
上 传 者:
sh-1993
说明: 简单PostgreSQL连接器
(Simple PostgreSQL connector)
文件列表:
.gradle (0, 2016-11-04)
.gradle\2.13 (0, 2016-11-04)
.gradle\2.13\taskArtifacts (0, 2016-11-04)
.gradle\2.13\taskArtifacts\cache.properties (30, 2016-11-04)
.gradle\2.13\taskArtifacts\cache.properties.lock (17, 2016-11-04)
.gradle\2.13\taskArtifacts\fileHashes.bin (23171, 2016-11-04)
.gradle\2.13\taskArtifacts\fileSnapshots.bin (69206, 2016-11-04)
.gradle\2.13\taskArtifacts\taskArtifacts.bin (27430, 2016-11-04)
.idea (0, 2016-11-04)
.idea\artifacts (0, 2016-11-04)
.idea\artifacts\postgres_db_jar.xml (8372, 2016-11-04)
.idea\compiler.xml (846, 2016-11-04)
.idea\copyright (0, 2016-11-04)
.idea\copyright\profiles_settings.xml (74, 2016-11-04)
.idea\gradle.xml (685, 2016-11-04)
.idea\libraries (0, 2016-11-04)
.idea\libraries\Gradle__ch_qos_logback_logback_classic_1_1_7.xml (595, 2016-11-04)
.idea\libraries\Gradle__ch_qos_logback_logback_core_1_1_7.xml (580, 2016-11-04)
.idea\libraries\Gradle__com_fasterxml_classmate_1_3_1.xml (561, 2016-11-04)
.idea\libraries\Gradle__com_fasterxml_jackson_core_jackson_annotations_2_8_3.xml (651, 2016-11-04)
.idea\libraries\Gradle__com_fasterxml_jackson_core_jackson_core_2_8_3.xml (616, 2016-11-04)
.idea\libraries\Gradle__com_fasterxml_jackson_core_jackson_databind_2_8_3.xml (636, 2016-11-04)
.idea\libraries\Gradle__javax_validation_validation_api_1_1_0_Final.xml (626, 2016-11-04)
.idea\libraries\Gradle__junit_junit_4_11.xml (513, 2016-11-04)
.idea\libraries\Gradle__org_apache_tomcat_embed_tomcat_embed_core_8_5_5.xml (632, 2016-11-04)
.idea\libraries\Gradle__org_apache_tomcat_embed_tomcat_embed_el_8_5_5.xml (622, 2016-11-04)
.idea\libraries\Gradle__org_apache_tomcat_embed_tomcat_embed_websocket_8_5_5.xml (657, 2016-11-04)
.idea\libraries\Gradle__org_flywaydb_flyway_core_4_0_3.xml (569, 2016-11-04)
.idea\libraries\Gradle__org_hamcrest_hamcrest_core_1_3.xml (569, 2016-11-04)
.idea\libraries\Gradle__org_hibernate_hibernate_validator_5_2_4_Final.xml (642, 2016-11-04)
.idea\libraries\Gradle__org_jboss_logging_jboss_logging_3_3_0_Final.xml (624, 2016-11-04)
.idea\libraries\Gradle__org_json_json_20160810.xml (537, 2016-11-04)
.idea\libraries\Gradle__org_postgresql_postgresql_9_4_1211.xml (583, 2016-11-04)
.idea\libraries\Gradle__org_slf4j_jcl_over_slf4j_1_7_21.xml (580, 2016-11-04)
.idea\libraries\Gradle__org_slf4j_jul_to_slf4j_1_7_21.xml (570, 2016-11-04)
.idea\libraries\Gradle__org_slf4j_log4j_over_slf4j_1_7_21.xml (589, 2016-11-04)
.idea\libraries\Gradle__org_slf4j_slf4j_api_1_7_21.xml (555, 2016-11-04)
.idea\libraries\Gradle__org_springframework_boot_spring_boot_1_4_1_RELEASE.xml (645, 2016-11-04)
.idea\libraries\Gradle__org_springframework_boot_spring_boot_autoconfigure_1_4_1_RELEASE.xml (715, 2016-11-04)
... ...
# Simple PostgreSQL connector
This is simple connection module for PostgreSQL which talks with `data` table and allows simple tasks to be done with it.
##How-to run
First, you got to configure the `config.properties` file to be able to connect to your ProgreSQL server
Make sure that `config.properties` is in the same folder as is your runnable jar
(If you have the jar but not the config file, one will be generated for you on your first launch)
Then, you can run the runnable jar from commandline using `java -jar postgres-db-1.0.0.jar`
And now you are up and running
This project runs on port `8888`
##Adding data
You can add `data` to DB using POST method, accepted input method is JSON.
For adding data you need to POST to `/data`.
For example, you have this running locally and you want to POST "custom data". For this you send `{ "data": "custom data" }` to http://localhost:8888/data
Nothing will be returned
##Searching data
You can search `data` table for strings that have common value as `search` termin has.
For finding data you need to GET from `/data` with value `search`.
For example, when running on localhost, we can use http://localhost:8888/data?search=mydata
The data returned is in JSON
##Removing data
You can remove `data` from table using `/data/remove` with value `remove`. The string must match exactly.
For example, when running on localhost, you could remove data using http://localhost:8888/data/remove?remove=mydata
Nothing will be returned
##Extra info
This project will generate data table named `data` using Flyway on launch. It also checks if the config file exists, if it doesn't, one will be generated and app will shut down.
近期下载者:
相关文件:
收藏者: