# java-guava **Repository Path**: sunshine002/java-guava ## Basic Information - **Project Name**: java-guava - **Description**: Guava is a tool's library for quickly development. - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-09-27 - **Last Updated**: 2021-09-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: SpringBoot, Java, guava ## README ## Summary Guava is a tool's library for quickly development. ## Deploy ``` mvn clean deploy -P sonatype-oss-release -DskipTests mvn clean deploy -P sonatype-oss-snapshots -DskipTests ``` ## Settings ``` sonatype-oss-snapshots username password sonatype-oss-staging username password ``` ## Repositorie ``` sonatype https://s01.oss.sonatype.org/content/groups/public/ ``` ## Dependency ``` io.github.sunshine001 guava 1.0.0-SNAPSHOT ``` ## Use #### GMap ``` GMap m = GMap.n().put("name", "cisco").put("address", 1); ``` #### GList ``` GList list = new GList<>().add("1").add("2").filter(e->{ return e.equals("1"); }).map(e->{ return e + "1"; }); ``` #### GString ``` GString gstring = new GString("123").append("345").append("789"); ``` #### GPost ``` GResponse response = GPost.n().setUrl("https://www.test.com") .setHeaders(headers).exec(); GResult result = response.result(); ``` ``` GResponse response = GPost.n().setUrl("http://www.test.com") .setHeaders(headers).setBody(body).exec(); Result result = response.json(r->{ Result rst = new Result(); rst.code = r.getString("code"); rst.data = r.getJSONArray("data").toArray(); return rst; }); ``` #### GException ``` try { throw new GException("0001", "failure"); } catch (GException ge) { Console.log(ge.build()); } ```