spring-attic / spring-cloud-gcp

Integration for Google Cloud Platform APIs with Spring
Apache License 2.0
705 stars 693 forks source link

Clarify if CloudSQL Proxy is required in the docs #948

Closed asaikali closed 6 years ago

asaikali commented 6 years ago

The GCP Cloud SQL Docs seem to indicate the the cloud sql proxy is the recommended way to connect to Cloud SQL databases on GCP.

The Spring Cloud GCP docs for JDBC don't mention the Cloud SQL Proxy at all so I assume it's not required.

Would be great if the docs had a note that talked about the relationship between Cloud SQL Proxy and Spring Cloud GCP, what the pros and cons are of using the cloud sql proxy and wethear spring projects should use the cloud sql proxy or not?

meltsufin commented 6 years ago

@asaikali Thank you for the issue submission. Indeed, this project does not require the use of the Cloud SQL Proxy because we use the Cloud SQL Socket Factory for JDBC drivers.

The reason Cloud SQL docs talk about the proxy is because they don't seem to be Java-specific, and other languages don't have something like the Cloud SQL socket factory.

asaikali commented 6 years ago

With a hello world app running on my macbook pro with GCP starters for postgres it's taking 58s to start the app as opposed to the typical 5s to connect via a local cloud_sql_proxy running on my mac. I have spent a lot of time reading through the docs both the GCP Cloud SQL and the Spring Cloud GCP and it's quite confusing what the "right" thing to do is. Would be great if clear recommendations were made in the docs and more importantly an explanation of what's going on behind the scenes and what the pros and cons are of different choices.

/Library/Java/Home/bin/java -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=56673 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=127.0.0.1 -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=56674:/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath /Library/Java/Home/jre/lib/charsets.jar:/Library/Java/Home/jre/lib/deploy.jar:/Library/Java/Home/jre/lib/ext/cldrdata.jar:/Library/Java/Home/jre/lib/ext/dnsns.jar:/Library/Java/Home/jre/lib/ext/jaccess.jar:/Library/Java/Home/jre/lib/ext/jfxrt.jar:/Library/Java/Home/jre/lib/ext/localedata.jar:/Library/Java/Home/jre/lib/ext/nashorn.jar:/Library/Java/Home/jre/lib/ext/sunec.jar:/Library/Java/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/Home/jre/lib/ext/zipfs.jar:/Library/Java/Home/jre/lib/javaws.jar:/Library/Java/Home/jre/lib/jce.jar:/Library/Java/Home/jre/lib/jfr.jar:/Library/Java/Home/jre/lib/jfxswt.jar:/Library/Java/Home/jre/lib/jsse.jar:/Library/Java/Home/jre/lib/management-agent.jar:/Library/Java/Home/jre/lib/plugin.jar:/Library/Java/Home/jre/lib/resources.jar:/Library/Java/Home/jre/lib/rt.jar:/Library/Java/Home/lib/ant-javafx.jar:/Library/Java/Home/lib/dt.jar:/Library/Java/Home/lib/javafx-mx.jar:/Library/Java/Home/lib/jconsole.jar:/Library/Java/Home/lib/packager.jar:/Library/Java/Home/lib/sa-jdi.jar:/Library/Java/Home/lib/tools.jar:/Users/asaikali/git/ProgrammingMastery/samples/spring-boot-docker/target/classes:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-starter-web/2.0.4.RELEASE/spring-boot-starter-web-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-starter/2.0.4.RELEASE/spring-boot-starter-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot/2.0.4.RELEASE/spring-boot-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.0.4.RELEASE/spring-boot-autoconfigure-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.0.4.RELEASE/spring-boot-starter-logging-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/Users/asaikali/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/Users/asaikali/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.10.0/log4j-to-slf4j-2.10.0.jar:/Users/asaikali/.m2/repository/org/apache/logging/log4j/log4j-api/2.10.0/log4j-api-2.10.0.jar:/Users/asaikali/.m2/repository/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar:/Users/asaikali/.m2/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar:/Users/asaikali/.m2/repository/org/yaml/snakeyaml/1.19/snakeyaml-1.19.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.0.4.RELEASE/spring-boot-starter-json-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.6/jackson-databind-2.9.6.jar:/Users/asaikali/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar:/Users/asaikali/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.6/jackson-core-2.9.6.jar:/Users/asaikali/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.9.6/jackson-datatype-jdk8-2.9.6.jar:/Users/asaikali/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.9.6/jackson-datatype-jsr310-2.9.6.jar:/Users/asaikali/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.9.6/jackson-module-parameter-names-2.9.6.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/2.0.4.RELEASE/spring-boot-starter-tomcat-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.32/tomcat-embed-core-8.5.32.jar:/Users/asaikali/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/8.5.32/tomcat-embed-el-8.5.32.jar:/Users/asaikali/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/8.5.32/tomcat-embed-websocket-8.5.32.jar:/Users/asaikali/.m2/repository/org/hibernate/validator/hibernate-validator/6.0.11.Final/hibernate-validator-6.0.11.Final.jar:/Users/asaikali/.m2/repository/javax/validation/validation-api/2.0.1.Final/validation-api-2.0.1.Final.jar:/Users/asaikali/.m2/repository/org/jboss/logging/jboss-logging/3.3.2.Final/jboss-logging-3.3.2.Final.jar:/Users/asaikali/.m2/repository/com/fasterxml/classmate/1.3.4/classmate-1.3.4.jar:/Users/asaikali/.m2/repository/org/springframework/spring-web/5.0.8.RELEASE/spring-web-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/spring-beans/5.0.8.RELEASE/spring-beans-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/spring-webmvc/5.0.8.RELEASE/spring-webmvc-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/spring-aop/5.0.8.RELEASE/spring-aop-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/spring-context/5.0.8.RELEASE/spring-context-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/spring-expression/5.0.8.RELEASE/spring-expression-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-starter-data-jpa/2.0.4.RELEASE/spring-boot-starter-data-jpa-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-starter-aop/2.0.4.RELEASE/spring-boot-starter-aop-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/org/aspectj/aspectjweaver/1.8.13/aspectjweaver-1.8.13.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-starter-jdbc/2.0.4.RELEASE/spring-boot-starter-jdbc-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/com/zaxxer/HikariCP/2.7.9/HikariCP-2.7.9.jar:/Users/asaikali/.m2/repository/org/springframework/spring-jdbc/5.0.8.RELEASE/spring-jdbc-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/hibernate/hibernate-core/5.2.17.Final/hibernate-core-5.2.17.Final.jar:/Users/asaikali/.m2/repository/org/hibernate/javax/persistence/hibernate-jpa-2.1-api/1.0.2.Final/hibernate-jpa-2.1-api-1.0.2.Final.jar:/Users/asaikali/.m2/repository/org/javassist/javassist/3.22.0-GA/javassist-3.22.0-GA.jar:/Users/asaikali/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar:/Users/asaikali/.m2/repository/org/jboss/jandex/2.0.3.Final/jandex-2.0.3.Final.jar:/Users/asaikali/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar:/Users/asaikali/.m2/repository/org/hibernate/common/hibernate-commons-annotations/5.0.1.Final/hibernate-commons-annotations-5.0.1.Final.jar:/Users/asaikali/.m2/repository/javax/transaction/javax.transaction-api/1.2/javax.transaction-api-1.2.jar:/Users/asaikali/.m2/repository/org/springframework/data/spring-data-jpa/2.0.9.RELEASE/spring-data-jpa-2.0.9.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/data/spring-data-commons/2.0.9.RELEASE/spring-data-commons-2.0.9.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/spring-orm/5.0.8.RELEASE/spring-orm-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/spring-tx/5.0.8.RELEASE/spring-tx-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/spring-aspects/5.0.8.RELEASE/spring-aspects-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/cloud/spring-cloud-gcp-starter-sql-postgresql/1.0.0.RELEASE/spring-cloud-gcp-starter-sql-postgresql-1.0.0.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/cloud/spring-cloud-gcp-starter/1.0.0.RELEASE/spring-cloud-gcp-starter-1.0.0.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/cloud/spring-cloud-gcp-core/1.0.0.RELEASE/spring-cloud-gcp-core-1.0.0.RELEASE.jar:/Users/asaikali/.m2/repository/com/google/cloud/google-cloud-core/1.38.0/google-cloud-core-1.38.0.jar:/Users/asaikali/.m2/repository/joda-time/joda-time/2.9.9/joda-time-2.9.9.jar:/Users/asaikali/.m2/repository/com/google/http-client/google-http-client/1.23.0/google-http-client-1.23.0.jar:/Users/asaikali/.m2/repository/org/apache/httpcomponents/httpclient/4.5.6/httpclient-4.5.6.jar:/Users/asaikali/.m2/repository/org/apache/httpcomponents/httpcore/4.4.10/httpcore-4.4.10.jar:/Users/asaikali/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar:/Users/asaikali/.m2/repository/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar:/Users/asaikali/.m2/repository/com/google/api/api-common/1.6.0/api-common-1.6.0.jar:/Users/asaikali/.m2/repository/com/google/api/gax/1.29.0/gax-1.29.0.jar:/Users/asaikali/.m2/repository/org/threeten/threetenbp/1.3.3/threetenbp-1.3.3.jar:/Users/asaikali/.m2/repository/com/google/auth/google-auth-library-oauth2-http/0.10.0/google-auth-library-oauth2-http-0.10.0.jar:/Users/asaikali/.m2/repository/com/google/auth/google-auth-library-credentials/0.10.0/google-auth-library-credentials-0.10.0.jar:/Users/asaikali/.m2/repository/com/google/protobuf/protobuf-java-util/3.6.0/protobuf-java-util-3.6.0.jar:/Users/asaikali/.m2/repository/com/google/protobuf/protobuf-java/3.6.0/protobuf-java-3.6.0.jar:/Users/asaikali/.m2/repository/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar:/Users/asaikali/.m2/repository/com/google/api/grpc/proto-google-common-protos/1.12.0/proto-google-common-protos-1.12.0.jar:/Users/asaikali/.m2/repository/com/google/api/grpc/proto-google-iam-v1/0.12.0/proto-google-iam-v1-0.12.0.jar:/Users/asaikali/.m2/repository/org/springframework/cloud/spring-cloud-gcp-autoconfigure/1.0.0.RELEASE/spring-cloud-gcp-autoconfigure-1.0.0.RELEASE.jar:/Users/asaikali/.m2/repository/com/google/cloud/sql/postgres-socket-factory/1.0.10/postgres-socket-factory-1.0.10.jar:/Users/asaikali/.m2/repository/com/google/cloud/sql/jdbc-socket-factory-core/1.0.10/jdbc-socket-factory-core-1.0.10.jar:/Users/asaikali/.m2/repository/com/google/apis/google-api-services-sqladmin/v1beta4-rev56-1.23.0/google-api-services-sqladmin-v1beta4-rev56-1.23.0.jar:/Users/asaikali/.m2/repository/com/google/api-client/google-api-client/1.23.0/google-api-client-1.23.0.jar:/Users/asaikali/.m2/repository/com/google/oauth-client/google-oauth-client/1.23.0/google-oauth-client-1.23.0.jar:/Users/asaikali/.m2/repository/com/google/http-client/google-http-client-jackson2/1.23.0/google-http-client-jackson2-1.23.0.jar:/Users/asaikali/.m2/repository/com/google/guava/guava/20.0/guava-20.0.jar:/Users/asaikali/.m2/repository/com/github/jnr/jnr-unixsocket/0.18/jnr-unixsocket-0.18.jar:/Users/asaikali/.m2/repository/com/github/jnr/jnr-ffi/2.1.4/jnr-ffi-2.1.4.jar:/Users/asaikali/.m2/repository/com/github/jnr/jffi/1.2.15/jffi-1.2.15.jar:/Users/asaikali/.m2/repository/com/github/jnr/jffi/1.2.15/jffi-1.2.15-native.jar:/Users/asaikali/.m2/repository/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar:/Users/asaikali/.m2/repository/org/ow2/asm/asm-commons/5.0.3/asm-commons-5.0.3.jar:/Users/asaikali/.m2/repository/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.jar:/Users/asaikali/.m2/repository/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar:/Users/asaikali/.m2/repository/org/ow2/asm/asm-util/5.0.3/asm-util-5.0.3.jar:/Users/asaikali/.m2/repository/com/github/jnr/jnr-x86asm/1.0.2/jnr-x86asm-1.0.2.jar:/Users/asaikali/.m2/repository/com/github/jnr/jnr-constants/0.9.8/jnr-constants-0.9.8.jar:/Users/asaikali/.m2/repository/com/github/jnr/jnr-enxio/0.16/jnr-enxio-0.16.jar:/Users/asaikali/.m2/repository/com/github/jnr/jnr-posix/3.0.35/jnr-posix-3.0.35.jar:/Users/asaikali/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar:/Users/asaikali/.m2/repository/org/postgresql/postgresql/42.2.4/postgresql-42.2.4.jar:/Users/asaikali/.m2/repository/com/h2database/h2/1.4.197/h2-1.4.197.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-starter-actuator/2.0.4.RELEASE/spring-boot-starter-actuator-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-actuator-autoconfigure/2.0.4.RELEASE/spring-boot-actuator-autoconfigure-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-actuator/2.0.4.RELEASE/spring-boot-actuator-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/io/micrometer/micrometer-core/1.0.6/micrometer-core-1.0.6.jar:/Users/asaikali/.m2/repository/org/hdrhistogram/HdrHistogram/2.1.10/HdrHistogram-2.1.10.jar:/Users/asaikali/.m2/repository/org/latencyutils/LatencyUtils/2.0.3/LatencyUtils-2.0.3.jar:/Users/asaikali/.m2/repository/org/springframework/spring-core/5.0.8.RELEASE/spring-core-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/spring-jcl/5.0.8.RELEASE/spring-jcl-5.0.8.RELEASE.jar hello.Application

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.0.4.RELEASE)

2018-08-10 20:31:10.544  INFO 32459 --- [           main] hello.Application                        : Starting Application on ams.fritz.box with PID 32459 (/Users/asaikali/git/ProgrammingMastery/samples/spring-boot-docker/target/classes started by asaikali in /Users/asaikali/git/ProgrammingMastery/samples/spring-boot-docker)
2018-08-10 20:31:10.547  INFO 32459 --- [           main] hello.Application                        : No active profile set, falling back to default profiles: default
2018-08-10 20:31:10.596  INFO 32459 --- [           main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@42a48628: startup date [Fri Aug 10 20:31:10 CEST 2018]; root of context hierarchy
2018-08-10 20:31:11.709  INFO 32459 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$e10bf005] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-08-10 20:31:12.127  INFO 32459 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2018-08-10 20:31:12.151  INFO 32459 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2018-08-10 20:31:12.151  INFO 32459 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.32
2018-08-10 20:31:12.154  INFO 32459 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener   : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/Users/asaikali/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
2018-08-10 20:31:12.276  INFO 32459 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2018-08-10 20:31:12.276  INFO 32459 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1683 ms
2018-08-10 20:31:12.566  INFO 32459 --- [ost-startStop-1] o.s.c.g.a.s.GcpCloudSqlAutoConfiguration : Default POSTGRESQL JdbcUrl provider. Connecting to jdbc:postgresql://google/postgres?socketFactory=com.google.cloud.sql.postgres.SocketFactory&socketFactoryArg=fe-asaikali:us-east1:myinstance&useSSL=false with driver org.postgresql.Driver
2018-08-10 20:31:12.846  INFO 32459 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-08-10 20:31:12.846  INFO 32459 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'webMvcMetricsFilter' to: [/*]
2018-08-10 20:31:12.846  INFO 32459 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-08-10 20:31:12.846  INFO 32459 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-08-10 20:31:12.846  INFO 32459 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2018-08-10 20:31:12.846  INFO 32459 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpTraceFilter' to: [/*]
2018-08-10 20:31:12.846  INFO 32459 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Servlet dispatcherServlet mapped to [/]
2018-08-10 20:31:12.933  INFO 32459 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2018-08-10 20:31:13.013  INFO 32459 --- [           main] c.g.cloud.sql.postgres.SocketFactory     : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] via ssl socket.
2018-08-10 20:31:13.014  INFO 32459 --- [           main] c.g.cloud.sql.core.SslSocketFactory      : First Cloud SQL connection, generating RSA key pair.
2018-08-10 20:31:13.881  INFO 32459 --- [           main] c.g.cloud.sql.core.SslSocketFactory      : Obtaining ephemeral certificate for Cloud SQL instance [fe-asaikali:us-east1:myinstance].
2018-08-10 20:31:15.668  INFO 32459 --- [           main] c.g.cloud.sql.core.SslSocketFactory      : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] on IP [35.227.102.197].
2018-08-10 20:31:17.112  INFO 32459 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2018-08-10 20:31:17.162  INFO 32459 --- [           main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2018-08-10 20:31:17.178  INFO 32459 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
    name: default
    ...]
2018-08-10 20:31:17.213  INFO 32459 --- [onnection adder] c.g.cloud.sql.postgres.SocketFactory     : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] via ssl socket.
2018-08-10 20:31:17.213  INFO 32459 --- [onnection adder] c.g.cloud.sql.core.SslSocketFactory      : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] on IP [35.227.102.197].
2018-08-10 20:31:17.288  INFO 32459 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {5.2.17.Final}
2018-08-10 20:31:17.289  INFO 32459 --- [           main] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
2018-08-10 20:31:17.342  INFO 32459 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2018-08-10 20:31:17.477  INFO 32459 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL95Dialect
2018-08-10 20:31:18.278  INFO 32459 --- [onnection adder] c.g.cloud.sql.postgres.SocketFactory     : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] via ssl socket.
2018-08-10 20:31:18.279  INFO 32459 --- [onnection adder] c.g.cloud.sql.core.SslSocketFactory      : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] on IP [35.227.102.197].
2018-08-10 20:31:19.343  INFO 32459 --- [onnection adder] c.g.cloud.sql.postgres.SocketFactory     : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] via ssl socket.
2018-08-10 20:31:19.343  INFO 32459 --- [onnection adder] c.g.cloud.sql.core.SslSocketFactory      : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] on IP [35.227.102.197].
2018-08-10 20:31:20.342  INFO 32459 --- [onnection adder] c.g.cloud.sql.postgres.SocketFactory     : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] via ssl socket.
2018-08-10 20:31:20.342  INFO 32459 --- [onnection adder] c.g.cloud.sql.core.SslSocketFactory      : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] on IP [35.227.102.197].
2018-08-10 20:31:21.380  INFO 32459 --- [onnection adder] c.g.cloud.sql.postgres.SocketFactory     : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] via ssl socket.
2018-08-10 20:31:21.380  INFO 32459 --- [onnection adder] c.g.cloud.sql.core.SslSocketFactory      : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] on IP [35.227.102.197].
2018-08-10 20:31:22.408  INFO 32459 --- [onnection adder] c.g.cloud.sql.postgres.SocketFactory     : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] via ssl socket.
2018-08-10 20:31:22.408  INFO 32459 --- [onnection adder] c.g.cloud.sql.core.SslSocketFactory      : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] on IP [35.227.102.197].
2018-08-10 20:31:23.471  INFO 32459 --- [onnection adder] c.g.cloud.sql.postgres.SocketFactory     : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] via ssl socket.
2018-08-10 20:31:23.471  INFO 32459 --- [onnection adder] c.g.cloud.sql.core.SslSocketFactory      : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] on IP [35.227.102.197].
2018-08-10 20:31:24.570  INFO 32459 --- [onnection adder] c.g.cloud.sql.postgres.SocketFactory     : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] via ssl socket.
2018-08-10 20:31:24.570  INFO 32459 --- [onnection adder] c.g.cloud.sql.core.SslSocketFactory      : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] on IP [35.227.102.197].
2018-08-10 20:31:25.655  INFO 32459 --- [onnection adder] c.g.cloud.sql.postgres.SocketFactory     : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] via ssl socket.
2018-08-10 20:31:25.656  INFO 32459 --- [onnection adder] c.g.cloud.sql.core.SslSocketFactory      : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] on IP [35.227.102.197].
2018-08-10 20:32:00.617  INFO 32459 --- [           main] o.h.e.j.e.i.LobCreatorBuilderImpl        : HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException

java.lang.reflect.InvocationTargetException: null
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171]
    at org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl.useContextualLobCreation(LobCreatorBuilderImpl.java:113) [hibernate-core-5.2.17.Final.jar:5.2.17.Final]
    at org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl.makeLobCreatorBuilder(LobCreatorBuilderImpl.java:54) [hibernate-core-5.2.17.Final.jar:5.2.17.Final]
    at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentImpl.<init>(JdbcEnvironmentImpl.java:271) [hibernate-core-5.2.17.Final.jar:5.2.17.Final]
    at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:114) [hibernate-core-5.2.17.Final.jar:5.2.17.Final]
    at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35) [hibernate-core-5.2.17.Final.jar:5.2.17.Final]
    at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88) [hibernate-core-5.2.17.Final.jar:5.2.17.Final]
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:259) [hibernate-core-5.2.17.Final.jar:5.2.17.Final]
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:233) [hibernate-core-5.2.17.Final.jar:5.2.17.Final]
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210) [hibernate-core-5.2.17.Final.jar:5.2.17.Final]
    at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:51) [hibernate-core-5.2.17.Final.jar:5.2.17.Final]
    at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94) [hibernate-core-5.2.17.Final.jar:5.2.17.Final]
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:242) [hibernate-core-5.2.17.Final.jar:5.2.17.Final]
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210) [hibernate-core-5.2.17.Final.jar:5.2.17.Final]
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:352) [hibernate-core-5.2.17.Final.jar:5.2.17.Final]
    at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:111) [hibernate-core-5.2.17.Final.jar:5.2.17.Final]
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:861) [hibernate-core-5.2.17.Final.jar:5.2.17.Final]
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:888) [hibernate-core-5.2.17.Final.jar:5.2.17.Final]
    at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:57) [spring-orm-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) [spring-orm-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:390) [spring-orm-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:377) [spring-orm-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) [spring-orm-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1758) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1695) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:573) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1089) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:859) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762) ~[spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:398) ~[spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:330) ~[spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1258) ~[spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246) ~[spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
    at hello.Application.main(Application.java:18) ~[classes/:na]
Caused by: java.sql.SQLFeatureNotSupportedException: Method org.postgresql.jdbc.PgConnection.createClob() is not yet implemented.
    at org.postgresql.Driver.notImplemented(Driver.java:688) ~[postgresql-42.2.4.jar:42.2.4]
    at org.postgresql.jdbc.PgConnection.createClob(PgConnection.java:1269) ~[postgresql-42.2.4.jar:42.2.4]
    ... 44 common frames omitted

2018-08-10 20:32:00.620  INFO 32459 --- [           main] org.hibernate.type.BasicTypeRegistry     : HHH000270: Type registration [java.util.UUID] overrides previous : org.hibernate.type.UUIDBinaryType@7efa3f63
2018-08-10 20:32:00.814  INFO 32459 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2018-08-10 20:32:00.895  INFO 32459 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-08-10 20:32:01.146  INFO 32459 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@42a48628: startup date [Fri Aug 10 20:31:10 CEST 2018]; root of context hierarchy
2018-08-10 20:32:01.180  WARN 32459 --- [           main] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2018-08-10 20:32:01.363  INFO 32459 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/]}" onto public java.lang.String hello.Application.home()
2018-08-10 20:32:01.368  INFO 32459 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2018-08-10 20:32:01.369  INFO 32459 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-08-10 20:32:01.407  INFO 32459 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-08-10 20:32:01.408  INFO 32459 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-08-10 20:32:01.513  WARN 32459 --- [           main] c.g.a.oauth2.DefaultCredentialsProvider  : Your application has authenticated using end user credentials from Google Cloud SDK. We recommend that most server applications use service accounts instead. If your application continues to use end user credentials from Cloud SDK, you might receive a "quota exceeded" or "API not enabled" error. For more information about service accounts, see https://cloud.google.com/docs/authentication/.
2018-08-10 20:32:01.515  INFO 32459 --- [           main] o.s.c.g.core.DefaultCredentialsProvider  : Default credentials provider for user 764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com
2018-08-10 20:32:01.515  INFO 32459 --- [           main] o.s.c.g.core.DefaultCredentialsProvider  : Scopes in use by default credentials: [https://www.googleapis.com/auth/pubsub, https://www.googleapis.com/auth/sqlservice.admin, https://www.googleapis.com/auth/devstorage.read_only, https://www.googleapis.com/auth/devstorage.read_write, https://www.googleapis.com/auth/trace.append, https://www.googleapis.com/auth/cloud-platform]
2018-08-10 20:32:01.610  INFO 32459 --- [           main] o.s.c.g.a.c.GcpContextAutoConfiguration  : The default project ID is fe-asaikali
2018-08-10 20:32:01.960  INFO 32459 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 14 endpoint(s) beneath base path '/actuator'
2018-08-10 20:32:01.968  INFO 32459 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/auditevents],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-10 20:32:01.969  INFO 32459 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/beans],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-10 20:32:01.969  INFO 32459 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/health],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-10 20:32:01.969  INFO 32459 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/conditions],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-10 20:32:01.969  INFO 32459 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/configprops],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-10 20:32:01.969  INFO 32459 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/env],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-10 20:32:01.970  INFO 32459 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/env/{toMatch}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-10 20:32:01.970  INFO 32459 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/info],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-10 20:32:01.970  INFO 32459 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/loggers/{name}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-10 20:32:01.970  INFO 32459 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/loggers/{name}],methods=[POST],consumes=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-10 20:32:01.971  INFO 32459 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/loggers],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-10 20:32:01.971  INFO 32459 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/heapdump],methods=[GET],produces=[application/octet-stream]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-10 20:32:01.971  INFO 32459 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/threaddump],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-10 20:32:01.971  INFO 32459 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/metrics/{requiredMetricName}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-10 20:32:01.971  INFO 32459 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/metrics],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-10 20:32:01.971  INFO 32459 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/scheduledtasks],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-10 20:32:01.971  INFO 32459 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/httptrace],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-10 20:32:01.972  INFO 32459 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/mappings],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-10 20:32:01.972  INFO 32459 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto protected java.util.Map<java.lang.String, java.util.Map<java.lang.String, org.springframework.boot.actuate.endpoint.web.Link>> org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping.links(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-08-10 20:32:02.030  INFO 32459 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2018-08-10 20:32:02.031  INFO 32459 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'dataSource' has been autodetected for JMX exposure
2018-08-10 20:32:02.036  INFO 32459 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located MBean 'dataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=dataSource,type=HikariDataSource]
2018-08-10 20:32:02.085  INFO 32459 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2018-08-10 20:32:02.089  INFO 32459 --- [           main] hello.Application                        : Started Application in 51.878 seconds (JVM running for 52.403)
2018-08-10 20:32:02.415  INFO 32459 --- [on(7)-127.0.0.1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring FrameworkServlet 'dispatcherServlet'
2018-08-10 20:32:02.415  INFO 32459 --- [on(7)-127.0.0.1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization started
2018-08-10 20:32:02.435  INFO 32459 --- [on(7)-127.0.0.1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 20 ms
meltsufin commented 6 years ago

I have never observed such a difference in the app startup time. Are you sure it's attributable to the socket factory? It looks like most the time is taken by this LobCreatorBuilderImpl step and it fails. Can you share a sample app that reproduces this slow startup issue? Thanks!

Regarding the recommended approach, @kurtisvg, can you shed some light on it?

asaikali commented 6 years ago

I am using the Spring Boot with Docker sample app repo at https://github.com/spring-guides/gs-spring-boot-docker/tree/master/complete

I did not add any code to the application I only added the spring boot actuator , the gcp could starter, my goal was very simple to see the health check end point report that status up for Postgres. The CLOB creator execption is a well know bug with Hibernate and PostgreSQL it does not increase startup up time in fact I fixed it by adding spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation: true to my application.yaml and I don't see any differences in the startup time still at 54 seconds. Below are my pom.xml and application.yaml everything else in the project is the same. I am running on a late 2017 15 inch Mac Book Pro fairly fast machine.

server:
  port: 8080
management:
  endpoints:
    web:
      exposure:
        include: "*"
  endpoint:
    health:
      show-details: always

spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation: true

spring:
  cloud:
    gcp:
      sql:
        instance-connection-name: fe-asaikali:us-east1:myinstance
        database-name: postgres

  datasource:
    username: postgres
    password: redacted

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<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>org.springframework</groupId>
    <artifactId>gs-spring-boot-docker</artifactId>
    <version>0.1.0</version>
    <packaging>jar</packaging>
    <name>Spring Boot Docker</name>
    <description>Getting started with Spring Boot and Docker</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.4.RELEASE</version>
        <relativePath />
    </parent>

    <properties>
        <docker.image.prefix>springio</docker.image.prefix>
        <java.version>1.8</java.version>
        <spring-cloud-gcp.version>1.0.0.RELEASE</spring-cloud-gcp.version>
        <spring-cloud.version>Finchley.SR1</spring-cloud.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <!-- tag::plugin[] -->
            <plugin>
                <groupId>com.spotify</groupId>
                <artifactId>dockerfile-maven-plugin</artifactId>
                <version>1.4.4</version>
                <executions>
                    <execution>
                        <id>default</id>
                        <goals>
                            <goal>build</goal>
                            <goal>push</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <repository>gcr.io/fe-asaikali/${project.artifactId}</repository>
                    <buildArgs>
                        <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
                    </buildArgs>
                </configuration>
            </plugin>
            <!-- end::plugin[] -->

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack</id>
                        <phase>package</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>${project.artifactId}</artifactId>
                                    <version>${project.version}</version>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-gcp-starter-sql-postgresql</artifactId>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-gcp-dependencies</artifactId>
                <version>${spring-cloud-gcp.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

</project>

startup output without the Hibernate Postgres CLOB error still a 56 second start up time. I am currently in Germany connecting to Cloud SQL in us-east1b basically the standard default instance created by following the quick-start tutorial for PostgreSQL from the CloudSQL docs.

/Library/Java/Home/bin/java -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=62508 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=127.0.0.1 -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=62509:/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath /Library/Java/Home/jre/lib/charsets.jar:/Library/Java/Home/jre/lib/deploy.jar:/Library/Java/Home/jre/lib/ext/cldrdata.jar:/Library/Java/Home/jre/lib/ext/dnsns.jar:/Library/Java/Home/jre/lib/ext/jaccess.jar:/Library/Java/Home/jre/lib/ext/jfxrt.jar:/Library/Java/Home/jre/lib/ext/localedata.jar:/Library/Java/Home/jre/lib/ext/nashorn.jar:/Library/Java/Home/jre/lib/ext/sunec.jar:/Library/Java/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/Home/jre/lib/ext/zipfs.jar:/Library/Java/Home/jre/lib/javaws.jar:/Library/Java/Home/jre/lib/jce.jar:/Library/Java/Home/jre/lib/jfr.jar:/Library/Java/Home/jre/lib/jfxswt.jar:/Library/Java/Home/jre/lib/jsse.jar:/Library/Java/Home/jre/lib/management-agent.jar:/Library/Java/Home/jre/lib/plugin.jar:/Library/Java/Home/jre/lib/resources.jar:/Library/Java/Home/jre/lib/rt.jar:/Library/Java/Home/lib/ant-javafx.jar:/Library/Java/Home/lib/dt.jar:/Library/Java/Home/lib/javafx-mx.jar:/Library/Java/Home/lib/jconsole.jar:/Library/Java/Home/lib/packager.jar:/Library/Java/Home/lib/sa-jdi.jar:/Library/Java/Home/lib/tools.jar:/Users/asaikali/git/ProgrammingMastery/samples/spring-boot-docker/target/classes:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-starter-web/2.0.4.RELEASE/spring-boot-starter-web-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-starter/2.0.4.RELEASE/spring-boot-starter-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot/2.0.4.RELEASE/spring-boot-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.0.4.RELEASE/spring-boot-autoconfigure-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.0.4.RELEASE/spring-boot-starter-logging-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/Users/asaikali/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/Users/asaikali/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.10.0/log4j-to-slf4j-2.10.0.jar:/Users/asaikali/.m2/repository/org/apache/logging/log4j/log4j-api/2.10.0/log4j-api-2.10.0.jar:/Users/asaikali/.m2/repository/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar:/Users/asaikali/.m2/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar:/Users/asaikali/.m2/repository/org/yaml/snakeyaml/1.19/snakeyaml-1.19.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.0.4.RELEASE/spring-boot-starter-json-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.9.6/jackson-databind-2.9.6.jar:/Users/asaikali/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.9.0/jackson-annotations-2.9.0.jar:/Users/asaikali/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.9.6/jackson-core-2.9.6.jar:/Users/asaikali/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.9.6/jackson-datatype-jdk8-2.9.6.jar:/Users/asaikali/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.9.6/jackson-datatype-jsr310-2.9.6.jar:/Users/asaikali/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.9.6/jackson-module-parameter-names-2.9.6.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/2.0.4.RELEASE/spring-boot-starter-tomcat-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.5.32/tomcat-embed-core-8.5.32.jar:/Users/asaikali/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/8.5.32/tomcat-embed-el-8.5.32.jar:/Users/asaikali/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/8.5.32/tomcat-embed-websocket-8.5.32.jar:/Users/asaikali/.m2/repository/org/hibernate/validator/hibernate-validator/6.0.11.Final/hibernate-validator-6.0.11.Final.jar:/Users/asaikali/.m2/repository/javax/validation/validation-api/2.0.1.Final/validation-api-2.0.1.Final.jar:/Users/asaikali/.m2/repository/org/jboss/logging/jboss-logging/3.3.2.Final/jboss-logging-3.3.2.Final.jar:/Users/asaikali/.m2/repository/com/fasterxml/classmate/1.3.4/classmate-1.3.4.jar:/Users/asaikali/.m2/repository/org/springframework/spring-web/5.0.8.RELEASE/spring-web-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/spring-beans/5.0.8.RELEASE/spring-beans-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/spring-webmvc/5.0.8.RELEASE/spring-webmvc-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/spring-aop/5.0.8.RELEASE/spring-aop-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/spring-context/5.0.8.RELEASE/spring-context-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/spring-expression/5.0.8.RELEASE/spring-expression-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-starter-data-jpa/2.0.4.RELEASE/spring-boot-starter-data-jpa-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-starter-aop/2.0.4.RELEASE/spring-boot-starter-aop-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/org/aspectj/aspectjweaver/1.8.13/aspectjweaver-1.8.13.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-starter-jdbc/2.0.4.RELEASE/spring-boot-starter-jdbc-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/com/zaxxer/HikariCP/2.7.9/HikariCP-2.7.9.jar:/Users/asaikali/.m2/repository/org/springframework/spring-jdbc/5.0.8.RELEASE/spring-jdbc-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/hibernate/hibernate-core/5.2.17.Final/hibernate-core-5.2.17.Final.jar:/Users/asaikali/.m2/repository/org/hibernate/javax/persistence/hibernate-jpa-2.1-api/1.0.2.Final/hibernate-jpa-2.1-api-1.0.2.Final.jar:/Users/asaikali/.m2/repository/org/javassist/javassist/3.22.0-GA/javassist-3.22.0-GA.jar:/Users/asaikali/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar:/Users/asaikali/.m2/repository/org/jboss/jandex/2.0.3.Final/jandex-2.0.3.Final.jar:/Users/asaikali/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar:/Users/asaikali/.m2/repository/org/hibernate/common/hibernate-commons-annotations/5.0.1.Final/hibernate-commons-annotations-5.0.1.Final.jar:/Users/asaikali/.m2/repository/javax/transaction/javax.transaction-api/1.2/javax.transaction-api-1.2.jar:/Users/asaikali/.m2/repository/org/springframework/data/spring-data-jpa/2.0.9.RELEASE/spring-data-jpa-2.0.9.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/data/spring-data-commons/2.0.9.RELEASE/spring-data-commons-2.0.9.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/spring-orm/5.0.8.RELEASE/spring-orm-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/spring-tx/5.0.8.RELEASE/spring-tx-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/spring-aspects/5.0.8.RELEASE/spring-aspects-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/cloud/spring-cloud-gcp-starter-sql-postgresql/1.0.0.RELEASE/spring-cloud-gcp-starter-sql-postgresql-1.0.0.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/cloud/spring-cloud-gcp-starter/1.0.0.RELEASE/spring-cloud-gcp-starter-1.0.0.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/cloud/spring-cloud-gcp-core/1.0.0.RELEASE/spring-cloud-gcp-core-1.0.0.RELEASE.jar:/Users/asaikali/.m2/repository/com/google/cloud/google-cloud-core/1.38.0/google-cloud-core-1.38.0.jar:/Users/asaikali/.m2/repository/joda-time/joda-time/2.9.9/joda-time-2.9.9.jar:/Users/asaikali/.m2/repository/com/google/http-client/google-http-client/1.23.0/google-http-client-1.23.0.jar:/Users/asaikali/.m2/repository/org/apache/httpcomponents/httpclient/4.5.6/httpclient-4.5.6.jar:/Users/asaikali/.m2/repository/org/apache/httpcomponents/httpcore/4.4.10/httpcore-4.4.10.jar:/Users/asaikali/.m2/repository/commons-codec/commons-codec/1.11/commons-codec-1.11.jar:/Users/asaikali/.m2/repository/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar:/Users/asaikali/.m2/repository/com/google/api/api-common/1.6.0/api-common-1.6.0.jar:/Users/asaikali/.m2/repository/com/google/api/gax/1.29.0/gax-1.29.0.jar:/Users/asaikali/.m2/repository/org/threeten/threetenbp/1.3.3/threetenbp-1.3.3.jar:/Users/asaikali/.m2/repository/com/google/auth/google-auth-library-oauth2-http/0.10.0/google-auth-library-oauth2-http-0.10.0.jar:/Users/asaikali/.m2/repository/com/google/auth/google-auth-library-credentials/0.10.0/google-auth-library-credentials-0.10.0.jar:/Users/asaikali/.m2/repository/com/google/protobuf/protobuf-java-util/3.6.0/protobuf-java-util-3.6.0.jar:/Users/asaikali/.m2/repository/com/google/protobuf/protobuf-java/3.6.0/protobuf-java-3.6.0.jar:/Users/asaikali/.m2/repository/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar:/Users/asaikali/.m2/repository/com/google/api/grpc/proto-google-common-protos/1.12.0/proto-google-common-protos-1.12.0.jar:/Users/asaikali/.m2/repository/com/google/api/grpc/proto-google-iam-v1/0.12.0/proto-google-iam-v1-0.12.0.jar:/Users/asaikali/.m2/repository/org/springframework/cloud/spring-cloud-gcp-autoconfigure/1.0.0.RELEASE/spring-cloud-gcp-autoconfigure-1.0.0.RELEASE.jar:/Users/asaikali/.m2/repository/com/google/cloud/sql/postgres-socket-factory/1.0.10/postgres-socket-factory-1.0.10.jar:/Users/asaikali/.m2/repository/com/google/cloud/sql/jdbc-socket-factory-core/1.0.10/jdbc-socket-factory-core-1.0.10.jar:/Users/asaikali/.m2/repository/com/google/apis/google-api-services-sqladmin/v1beta4-rev56-1.23.0/google-api-services-sqladmin-v1beta4-rev56-1.23.0.jar:/Users/asaikali/.m2/repository/com/google/api-client/google-api-client/1.23.0/google-api-client-1.23.0.jar:/Users/asaikali/.m2/repository/com/google/oauth-client/google-oauth-client/1.23.0/google-oauth-client-1.23.0.jar:/Users/asaikali/.m2/repository/com/google/http-client/google-http-client-jackson2/1.23.0/google-http-client-jackson2-1.23.0.jar:/Users/asaikali/.m2/repository/com/google/guava/guava/20.0/guava-20.0.jar:/Users/asaikali/.m2/repository/com/github/jnr/jnr-unixsocket/0.18/jnr-unixsocket-0.18.jar:/Users/asaikali/.m2/repository/com/github/jnr/jnr-ffi/2.1.4/jnr-ffi-2.1.4.jar:/Users/asaikali/.m2/repository/com/github/jnr/jffi/1.2.15/jffi-1.2.15.jar:/Users/asaikali/.m2/repository/com/github/jnr/jffi/1.2.15/jffi-1.2.15-native.jar:/Users/asaikali/.m2/repository/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar:/Users/asaikali/.m2/repository/org/ow2/asm/asm-commons/5.0.3/asm-commons-5.0.3.jar:/Users/asaikali/.m2/repository/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.jar:/Users/asaikali/.m2/repository/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar:/Users/asaikali/.m2/repository/org/ow2/asm/asm-util/5.0.3/asm-util-5.0.3.jar:/Users/asaikali/.m2/repository/com/github/jnr/jnr-x86asm/1.0.2/jnr-x86asm-1.0.2.jar:/Users/asaikali/.m2/repository/com/github/jnr/jnr-constants/0.9.8/jnr-constants-0.9.8.jar:/Users/asaikali/.m2/repository/com/github/jnr/jnr-enxio/0.16/jnr-enxio-0.16.jar:/Users/asaikali/.m2/repository/com/github/jnr/jnr-posix/3.0.35/jnr-posix-3.0.35.jar:/Users/asaikali/.m2/repository/org/postgresql/postgresql/42.2.4/postgresql-42.2.4.jar:/Users/asaikali/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar:/Users/asaikali/.m2/repository/com/h2database/h2/1.4.197/h2-1.4.197.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-starter-actuator/2.0.4.RELEASE/spring-boot-starter-actuator-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-actuator-autoconfigure/2.0.4.RELEASE/spring-boot-actuator-autoconfigure-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/boot/spring-boot-actuator/2.0.4.RELEASE/spring-boot-actuator-2.0.4.RELEASE.jar:/Users/asaikali/.m2/repository/io/micrometer/micrometer-core/1.0.6/micrometer-core-1.0.6.jar:/Users/asaikali/.m2/repository/org/hdrhistogram/HdrHistogram/2.1.10/HdrHistogram-2.1.10.jar:/Users/asaikali/.m2/repository/org/latencyutils/LatencyUtils/2.0.3/LatencyUtils-2.0.3.jar:/Users/asaikali/.m2/repository/org/springframework/spring-core/5.0.8.RELEASE/spring-core-5.0.8.RELEASE.jar:/Users/asaikali/.m2/repository/org/springframework/spring-jcl/5.0.8.RELEASE/spring-jcl-5.0.8.RELEASE.jar hello.Application

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.0.4.RELEASE)

2018-08-11 00:00:02.157  INFO 43791 --- [           main] hello.Application                        : Starting Application on ams.fritz.box with PID 43791 (/Users/asaikali/git/ProgrammingMastery/samples/spring-boot-docker/target/classes started by asaikali in /Users/asaikali/git/ProgrammingMastery/samples/spring-boot-docker)
2018-08-11 00:00:02.162  INFO 43791 --- [           main] hello.Application                        : No active profile set, falling back to default profiles: default
2018-08-11 00:00:02.220  INFO 43791 --- [           main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6aeb35e6: startup date [Sat Aug 11 00:00:02 CEST 2018]; root of context hierarchy
2018-08-11 00:00:03.285  INFO 43791 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$ddb1195d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-08-11 00:00:03.597  INFO 43791 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2018-08-11 00:00:03.614  INFO 43791 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2018-08-11 00:00:03.614  INFO 43791 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.32
2018-08-11 00:00:03.617  INFO 43791 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener   : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/Users/asaikali/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
2018-08-11 00:00:03.717  INFO 43791 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2018-08-11 00:00:03.717  INFO 43791 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1500 ms
2018-08-11 00:00:03.996  INFO 43791 --- [ost-startStop-1] o.s.c.g.a.s.GcpCloudSqlAutoConfiguration : Default POSTGRESQL JdbcUrl provider. Connecting to jdbc:postgresql://google/postgres?socketFactory=com.google.cloud.sql.postgres.SocketFactory&socketFactoryArg=fe-asaikali:us-east1:myinstance&useSSL=false with driver org.postgresql.Driver
2018-08-11 00:00:04.280  INFO 43791 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-08-11 00:00:04.280  INFO 43791 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'webMvcMetricsFilter' to: [/*]
2018-08-11 00:00:04.280  INFO 43791 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-08-11 00:00:04.280  INFO 43791 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-08-11 00:00:04.280  INFO 43791 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2018-08-11 00:00:04.280  INFO 43791 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpTraceFilter' to: [/*]
2018-08-11 00:00:04.280  INFO 43791 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Servlet dispatcherServlet mapped to [/]
2018-08-11 00:00:04.343  INFO 43791 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2018-08-11 00:00:04.421  INFO 43791 --- [           main] c.g.cloud.sql.postgres.SocketFactory     : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] via ssl socket.
2018-08-11 00:00:04.422  INFO 43791 --- [           main] c.g.cloud.sql.core.SslSocketFactory      : First Cloud SQL connection, generating RSA key pair.
2018-08-11 00:00:05.927  INFO 43791 --- [           main] c.g.cloud.sql.core.SslSocketFactory      : Obtaining ephemeral certificate for Cloud SQL instance [fe-asaikali:us-east1:myinstance].
2018-08-11 00:00:07.591  INFO 43791 --- [           main] c.g.cloud.sql.core.SslSocketFactory      : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] on IP [35.227.102.197].
2018-08-11 00:00:08.923  INFO 43791 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2018-08-11 00:00:08.966  INFO 43791 --- [           main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2018-08-11 00:00:08.979  INFO 43791 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
    name: default
    ...]
2018-08-11 00:00:09.027  INFO 43791 --- [onnection adder] c.g.cloud.sql.postgres.SocketFactory     : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] via ssl socket.
2018-08-11 00:00:09.027  INFO 43791 --- [onnection adder] c.g.cloud.sql.core.SslSocketFactory      : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] on IP [35.227.102.197].
2018-08-11 00:00:09.042  INFO 43791 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {5.2.17.Final}
2018-08-11 00:00:09.043  INFO 43791 --- [           main] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
2018-08-11 00:00:09.083  INFO 43791 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2018-08-11 00:00:09.172  INFO 43791 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL95Dialect
2018-08-11 00:00:10.614  INFO 43791 --- [onnection adder] c.g.cloud.sql.postgres.SocketFactory     : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] via ssl socket.
2018-08-11 00:00:10.614  INFO 43791 --- [onnection adder] c.g.cloud.sql.core.SslSocketFactory      : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] on IP [35.227.102.197].
2018-08-11 00:00:11.733  INFO 43791 --- [onnection adder] c.g.cloud.sql.postgres.SocketFactory     : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] via ssl socket.
2018-08-11 00:00:11.734  INFO 43791 --- [onnection adder] c.g.cloud.sql.core.SslSocketFactory      : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] on IP [35.227.102.197].
2018-08-11 00:00:12.813  INFO 43791 --- [onnection adder] c.g.cloud.sql.postgres.SocketFactory     : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] via ssl socket.
2018-08-11 00:00:12.814  INFO 43791 --- [onnection adder] c.g.cloud.sql.core.SslSocketFactory      : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] on IP [35.227.102.197].
2018-08-11 00:00:13.806  INFO 43791 --- [onnection adder] c.g.cloud.sql.postgres.SocketFactory     : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] via ssl socket.
2018-08-11 00:00:13.807  INFO 43791 --- [onnection adder] c.g.cloud.sql.core.SslSocketFactory      : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] on IP [35.227.102.197].
2018-08-11 00:00:14.807  INFO 43791 --- [onnection adder] c.g.cloud.sql.postgres.SocketFactory     : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] via ssl socket.
2018-08-11 00:00:14.808  INFO 43791 --- [onnection adder] c.g.cloud.sql.core.SslSocketFactory      : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] on IP [35.227.102.197].
2018-08-11 00:00:15.862  INFO 43791 --- [onnection adder] c.g.cloud.sql.postgres.SocketFactory     : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] via ssl socket.
2018-08-11 00:00:15.862  INFO 43791 --- [onnection adder] c.g.cloud.sql.core.SslSocketFactory      : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] on IP [35.227.102.197].
2018-08-11 00:00:16.848  INFO 43791 --- [onnection adder] c.g.cloud.sql.postgres.SocketFactory     : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] via ssl socket.
2018-08-11 00:00:16.849  INFO 43791 --- [onnection adder] c.g.cloud.sql.core.SslSocketFactory      : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] on IP [35.227.102.197].
2018-08-11 00:00:17.803  INFO 43791 --- [onnection adder] c.g.cloud.sql.postgres.SocketFactory     : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] via ssl socket.
2018-08-11 00:00:17.804  INFO 43791 --- [onnection adder] c.g.cloud.sql.core.SslSocketFactory      : Connecting to Cloud SQL instance [fe-asaikali:us-east1:myinstance] on IP [35.227.102.197].
2018-08-11 00:00:56.545  INFO 43791 --- [           main] o.h.e.j.e.i.LobCreatorBuilderImpl        : HHH000421: Disabling contextual LOB creation as hibernate.jdbc.lob.non_contextual_creation is true
2018-08-11 00:00:56.546  INFO 43791 --- [           main] org.hibernate.type.BasicTypeRegistry     : HHH000270: Type registration [java.util.UUID] overrides previous : org.hibernate.type.UUIDBinaryType@6d67f5eb
2018-08-11 00:00:56.681  INFO 43791 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2018-08-11 00:00:56.774  INFO 43791 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-08-11 00:00:57.056  INFO 43791 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6aeb35e6: startup date [Sat Aug 11 00:00:02 CEST 2018]; root of context hierarchy
2018-08-11 00:00:57.086  WARN 43791 --- [           main] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2018-08-11 00:00:57.471  INFO 43791 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/]}" onto public java.lang.String hello.Application.home()
2018-08-11 00:00:57.476  INFO 43791 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2018-08-11 00:00:57.476  INFO 43791 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-08-11 00:00:57.503  INFO 43791 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-08-11 00:00:57.503  INFO 43791 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-08-11 00:00:57.573  WARN 43791 --- [           main] c.g.a.oauth2.DefaultCredentialsProvider  : Your application has authenticated using end user credentials from Google Cloud SDK. We recommend that most server applications use service accounts instead. If your application continues to use end user credentials from Cloud SDK, you might receive a "quota exceeded" or "API not enabled" error. For more information about service accounts, see https://cloud.google.com/docs/authentication/.
2018-08-11 00:00:57.574  INFO 43791 --- [           main] o.s.c.g.core.DefaultCredentialsProvider  : Default credentials provider for user 764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com
2018-08-11 00:00:57.574  INFO 43791 --- [           main] o.s.c.g.core.DefaultCredentialsProvider  : Scopes in use by default credentials: [https://www.googleapis.com/auth/pubsub, https://www.googleapis.com/auth/sqlservice.admin, https://www.googleapis.com/auth/devstorage.read_only, https://www.googleapis.com/auth/devstorage.read_write, https://www.googleapis.com/auth/trace.append, https://www.googleapis.com/auth/cloud-platform]
2018-08-11 00:00:57.588  INFO 43791 --- [           main] o.s.c.g.a.c.GcpContextAutoConfiguration  : The default project ID is fe-asaikali
2018-08-11 00:00:57.938  INFO 43791 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 14 endpoint(s) beneath base path '/actuator'
2018-08-11 00:00:57.946  INFO 43791 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/auditevents],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-11 00:00:57.947  INFO 43791 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/beans],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-11 00:00:57.947  INFO 43791 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/health],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-11 00:00:57.947  INFO 43791 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/conditions],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-11 00:00:57.948  INFO 43791 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/configprops],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-11 00:00:57.948  INFO 43791 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/env],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-11 00:00:57.948  INFO 43791 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/env/{toMatch}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-11 00:00:57.948  INFO 43791 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/info],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-11 00:00:57.948  INFO 43791 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/loggers/{name}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-11 00:00:57.949  INFO 43791 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/loggers/{name}],methods=[POST],consumes=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-11 00:00:57.949  INFO 43791 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/loggers],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-11 00:00:57.950  INFO 43791 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/heapdump],methods=[GET],produces=[application/octet-stream]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-11 00:00:57.950  INFO 43791 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/threaddump],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-11 00:00:57.950  INFO 43791 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/metrics/{requiredMetricName}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-11 00:00:57.950  INFO 43791 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/metrics],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-11 00:00:57.950  INFO 43791 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/scheduledtasks],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-11 00:00:57.950  INFO 43791 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/httptrace],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-11 00:00:57.951  INFO 43791 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/mappings],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-08-11 00:00:57.951  INFO 43791 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto protected java.util.Map<java.lang.String, java.util.Map<java.lang.String, org.springframework.boot.actuate.endpoint.web.Link>> org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping.links(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-08-11 00:00:57.997  INFO 43791 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2018-08-11 00:00:57.999  INFO 43791 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'dataSource' has been autodetected for JMX exposure
2018-08-11 00:00:58.005  INFO 43791 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located MBean 'dataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=dataSource,type=HikariDataSource]
2018-08-11 00:00:58.048  INFO 43791 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2018-08-11 00:00:58.052  INFO 43791 --- [           main] hello.Application                        : Started Application in 56.19 seconds (JVM running for 56.695)
2018-08-11 00:00:58.177  INFO 43791 --- [on(8)-127.0.0.1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring FrameworkServlet 'dispatcherServlet'
2018-08-11 00:00:58.177  INFO 43791 --- [on(8)-127.0.0.1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization started
2018-08-11 00:00:58.193  INFO 43791 --- [on(8)-127.0.0.1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 15 ms
asaikali commented 6 years ago

@meltsufin Hibernate is the issue here, I just ran a test by taking out the spring-data-jpa starter and I can now connect via the gcp starter in 3.186 seconds startup time if I go through the local proxy the startup time time is 2.87 seconds. If I configure the app to talk to postgres 10 on my local machine with spring data jpa I get a startup time of 3.7 seconds.

I created a CloudMySQL instance and tested it with the gcp mysql starter and spring data jpa app startup time was at 9.413 seconds.

Not sure why Hibernate has such a long startup time when connecting to CloudSQL PostgreSQL maybe this is a hibernate issue.

kurtisvg commented 6 years ago

Mike is correct, the reason why there is a divide in the docs is because the typical recommendation is "use the proxy", which Java being the exception.

Behind the scenes they work the same, creating an SSL connection to your CloudSQL server behind the scenes (in JDBC Socket Factory this connection is direct instead of being proxied). There is really no significant difference, except that the SocketFactory is somewhat more convenient for Java users.

asaikali commented 6 years ago

I tried with Hibernate + Postgres Cloud SQL with spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults: false and got a startup time of 8.935 seconds this was based on https://stackoverflow.com/a/10109005/438319 and https://hibernate.atlassian.net/browse/HHH-9124

Not sure why Hibernate has such a long startup time when connecting to CloudSQL PostgreSQL vs. Local PostgreSQL server, Maybe it's a Postgres 9.6 vs. 10 issues.

meltsufin commented 6 years ago

I'm closing this since the issue doesn't seem to be caused by Spring Cloud GCP. I hope someone else finds this helpful if they encounter this same issue. Thanks @asaikali!