This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build to local docker | |
gradle build jibDockerBuild | |
# Run in local docker | |
docker run --rm -it -e SPRING_PROFILES_ACTIVE=local -p 8080:8080 IMAGE | |
# Build to TAR using arbitrary image | |
gradle build jibBuildTar -Djib.from.image=openjdk:11-jre --exclude-task test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logging: | |
level: | |
org.hibernate.SQL: DEBUG | |
org.hibernate.type.descriptor.sql.BasicBinder: TRACE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring: | |
jpa: | |
show-sql: true | |
properties.hibernate.format_sql: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --rm -it -p 8080:8080 -p 9010:9010 -e JAVA_TOOL_OPTIONS=' | |
-Xmx450M | |
-XX:+UseConcMarkSweepGC | |
-XX:NativeMemoryTracking=summary | |
-Djava.rmi.server.hostname=127.0.0.1 | |
-Dcom.sun.management.jmxremote | |
-Dcom.sun.management.jmxremote.port=9010 | |
-Dcom.sun.management.jmxremote.rmi.port=9010 | |
-Dcom.sun.management.jmxremote.local.only=false | |
-Dcom.sun.management.jmxremote.authenticate=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -d --restart=always | |
\ | |
-p {{service_port}}:8080 | |
-p {{jmx_port}}:{{jmx_port}} | |
\ | |
-e JAVA_OPTS=' | |
-Xmx{{java_memory_limit}} | |
-XX:+UseConcMarkSweepGC | |
-XX:NativeMemoryTracking=summary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SCRIPT TO 'db-dump.sql' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@DataJpaTest | |
@ActiveProfiles("test") | |
/* | |
By default @DataJpaTest uses embeded h2 database and ignores the connection string declared in application.properties. | |
This annotation disables this behavior and db configured in bootstrap.yml will be used by @DataJpaTest test. | |
*/ | |
@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE) | |
@Sql("classpath:my_data.sql") | |
class MyRepositoryTest { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.demo.config; | |
import org.springframework.boot.web.error.ErrorAttributeOptions; | |
import org.springframework.boot.web.servlet.error.DefaultErrorAttributes; | |
import org.springframework.stereotype.Component; | |
import org.springframework.web.context.request.WebRequest; | |
import java.util.Map; | |
@Component |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server.error.include-stacktrace=never # when to include a stacktrace attribute (never/alway/on-trace-param) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring.kafka.consumer.auto-offset-reset=earliest | |
spring.kafka.consumer.enable-auto-commit=true | |
spring.kafka.consumer.max-poll-records=100 | |
spring.kafka.consumer.fetch-max-wait=2s | |
spring.kafka.listener.type=BATCH | |
spring.kafka.listener.concurrency=12 | |
spring.kafka.consumer.group-id=batchTest1 | |
spring.kafka.client-id=batchTest1 | |
spring.kafka.listener.ack-mode=BATCH |
OlderNewer