thombergs / code-examples Goto Github PK
View Code? Open in Web Editor NEWA collection of code examples from blog posts etc.
License: MIT License
A collection of code examples from blog posts etc.
License: MIT License
link is: https://reflectoring.io/guide-to-axios/
link should be: https://reflectoring.io/tutorial-guide-axios/
While running the consumer graphql contract test command: yarn test:pact:graphql
Sharing path for reference :
https://github.com/thombergs/code-examples/tree/master/pact/pact-react-consumer
It is giving the following error:
Error: Network error: request to http://localhost:8080/graphql failed, reason: connect ECONNREFUSED 127.0.0.1:8080
at new ApolloError (/code-examples/pact/pact-react-consumer/node_modules/src/errors/ApolloError.ts:56:5)
at /code-examples/pact/pact-react-consumer/node_modules/src/core/QueryManager.ts:509:31
at /code-examples/pact/pact-react-consumer/node_modules/src/core/QueryManager.ts:1041:11
at Array.forEach (<anonymous>)
at /code-examples/pact/pact-react-consumer/node_modules/src/core/QueryManager.ts:1040:10
at Map.forEach (<anonymous>)
Hi,
While running the tests in spring-boot-testconfiguration I've noticed that the webClient
bean that is supposed to be overridden in the WebClientTestConfiguration is still the one from the WebClientConfiguration.
It works as expected when the WebClientTestConfiguration is given at the @SpringBootTest
annotation and not with the @Import
annotation:
@SpringBootTest(classes = WebClientTestConfiguration.class)
Hi:
First, thanks for read my message.
I found a page that use feign & spring hateoas to get resource from spring data rest. But I found that I could not get id for saving and updating. Could you help me?
There's spring data rest returning.
{
"id": 16,
"firstName": "MMMMMM",
"lastName": "CCCCCCC",
"age": 119,
"_links": {
"self": {
"href": "http://localhost:8080/customers/16"
},
"customer": {
"href": "http://localhost:8080/customers/16"
}
}
Client receive the following
{
"id": null,
"firstName": "MMMMMM",
"lastName": "CCCCCCC",
"age": 119,
"_links": {
"self": {
"href": "http://localhost:8080/customers/16"
},
"customer": {
"href": "http://localhost:8080/customers/16"
}
}
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
these two extra depencides should be added
https://github.com/thombergs/code-examples/tree/master/spring-boot/feature-flag
from the code (https://github.com/thombergs/code-examples/tree/master/spring-boot/feature-flags) I read
LD Flags that are to be created manually after login into launchdarkly as read from the code
1. Boolean Type with variations
global-boolean-flag : true or false
user-based-percentage-rollout : true or false
user-clicked-flag : true or false
2. Date as String with variations
current-date-for-welcome-message : "now", "11-01-2023"
current-date-for-welcome-email : "now", "12-02-2024"
to be created.. however exact ways to create these flags with all the variations values is not clear, kindly put them in readme.md
https://github.com/thombergs/code-examples/tree/master/spring-boot/feature-flags
clicking on testuyser button
fails with
also checked the code for /test path nothing exists..
The link in the Readme-File is not working, though you can find an article with a refrence to this repo here:
https://reflectoring.io/java-release-notes/
In the article it says T-W-R was added with Java_9. Thats wrong, it was added with Java_7.
So this file https://github.com/thombergs/code-examples/blob/1f37a81b90003c35beed6216432f689936917cb1/core-java/versions/src/main/java/com/reflectoring/io/java9/TryWithResources.java should be deleted (or al least be moved to s.th. like 'other stuff').
Java_7 release-notes:
https://www.oracle.com/java/technologies/javase/jdk7-relnotes.html
Info/ read:
https://www.baeldung.com/java-try-with-resources
I have looked with great interest at your @ConfigurationProperties article and code:
https://reflectoring.io/spring-boot-configuration-properties/
and
spring-boot/configuration/src/main/java/io/reflectoring/configuration on GitHub
because I am working on utilizing it for the creation of custom properties on my Spring Boot application. Unfortunately, while the information you gave was pretty complete on how to use @ConfiguratioProperties to create configuration properties, there is one pretty major piece of information that is missing:
How do you access the properties once you have defined them and made Spring boot "aware" of them???
Using your properties as an example: you made the MailModuleProperties class to add the twp properties "enabled" and "defaultSubject", and you created two versions of the MailModuleConfiguration class to make a MailModuleProperties instance available to the Spring Boot application. Well and good, but how do you actually access and use the two properties once you make them together?
Suppose I want to create a Controller class with a @GetMapping annotated method that wraps the value of the "defaultSubject" property in some HTML and returns it to a client application or browser? How do I access the MailModuleProperties instance in order to get the property???
I did try to use the @value annotation to set a string to the value of defaultSubject for use in a Controller method, but the string was null when I attempted to use it.
Without that critical piece of information, your information about using @ConfigurationProperties is pretty unusable.
Can you please include an example of how one actually accesses and uses the properties you made in a Controller or Service class?
Where we can set AWS Access Key & AWS Secret Key for AWS SQS Project?
Thanks
I found out the property server.reflectoring.trace is not anymore
https://docs.spring.io/spring-boot/docs/current/reference/html/index.html
Is there other property I can use?
Hi,
This is regarding the blog post on spring boot validation.
Under Validating Input to a Spring Service Method, the test for verifying this validation uses @ExtendWith(SpringExtension.class)
and @SpringBootTest
.
I am trying to keep service layer unit tests free of Spring framework (as recommended here). Unfortunately, unit tests written this way do not trigger validation.
Would be great if you can throw some light on how validation in service layer can be unit tested without using @SpringBootTest
. Thanks.
Regards,
Nanda
The spring-boot-kafka example generate this error message, here it is the stack.
org.apache.kafka.common.config.ConfigException: Missing required configuration "value.serializer" which has no default value.
at org.apache.kafka.common.config.ConfigDef.parseValue(ConfigDef.java:477) ~[kafka-clients-2.5.0.jar:na]
at org.apache.kafka.common.config.ConfigDef.parse(ConfigDef.java:467) ~[kafka-clients-2.5.0.jar:na]
at org.apache.kafka.common.config.AbstractConfig.(AbstractConfig.java:108) ~[kafka-clients-2.5.0.jar:na]
at org.apache.kafka.common.config.AbstractConfig.(AbstractConfig.java:129) ~[kafka-clients-2.5.0.jar:na]
at org.apache.kafka.clients.producer.ProducerConfig.(ProducerConfig.java:481) ~[kafka-clients-2.5.0.jar:na]
at org.apache.kafka.clients.producer.KafkaProducer.(KafkaProducer.java:326) ~[kafka-clients-2.5.0.jar:na]
at org.apache.kafka.clients.producer.KafkaProducer.(KafkaProducer.java:287) ~[kafka-clients-2.5.0.jar:na]
at org.springframework.kafka.core.DefaultKafkaProducerFactory.createRawProducer(DefaultKafkaProducerFactory.java:645) ~[spring-kafka-2.5.2.RELEASE.jar:2.5.2.RELEASE]
at org.springframework.kafka.core.DefaultKafkaProducerFactory.createKafkaProducer(DefaultKafkaProducerFactory.java:520) ~[spring-kafka-2.5.2.RELEASE.jar:2.5.2.RELEASE]
at org.springframework.kafka.core.DefaultKafkaProducerFactory.doCreateProducer(DefaultKafkaProducerFactory.java:497) ~[spring-kafka-2.5.2.RELEASE.jar:2.5.2.RELEASE]
at org.springframework.kafka.core.DefaultKafkaProducerFactory.createProducer(DefaultKafkaProducerFactory.java:458) ~[spring-kafka-2.5.2.RELEASE.jar:2.5.2.RELEASE]
at org.springframework.kafka.core.DefaultKafkaProducerFactory.createProducer(DefaultKafkaProducerFactory.java:452) ~[spring-kafka-2.5.2.RELEASE.jar:2.5.2.RELEASE]
at org.springframework.kafka.core.KafkaTemplate.getTheProducer(KafkaTemplate.java:662) ~[spring-kafka-2.5.2.RELEASE.jar:2.5.2.RELEASE]
at org.springframework.kafka.core.KafkaTemplate.doSend(KafkaTemplate.java:548) ~[spring-kafka-2.5.2.RELEASE.jar:2.5.2.RELEASE]
at org.springframework.kafka.core.KafkaTemplate.send(KafkaTemplate.java:360) ~[spring-kafka-2.5.2.RELEASE.jar:2.5.2.RELEASE]
at io.reflectoring.kafka.KafkaSenderExample.sendMessage(KafkaSenderExample.java:34) ~[classes/:na]
at io.reflectoring.kafka.InitSend.initiateSendingMessage(InitSend.java:36) ~[classes/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:564) ~[na:na]
at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:305) ~[spring-context-5.2.7.RELEASE.jar:5.2.7.RELEASE]
at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:190) ~[spring-context-5.2.7.RELEASE.jar:5.2.7.RELEASE]
at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:153) ~[spring-context-5.2.7.RELEASE.jar:5.2.7.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.2.7.RELEASE.jar:5.2.7.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.2.7.RELEASE.jar:5.2.7.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.2.7.RELEASE.jar:5.2.7.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:404) ~[spring-context-5.2.7.RELEASE.jar:5.2.7.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:361) ~[spring-context-5.2.7.RELEASE.jar:5.2.7.RELEASE]
at org.springframework.boot.context.event.EventPublishingRunListener.running(EventPublishingRunListener.java:108) ~[spring-boot-2.3.1.RELEASE.jar:2.3.1.RELEASE]
at org.springframework.boot.SpringApplicationRunListeners.running(SpringApplicationRunListeners.java:77) ~[spring-boot-2.3.1.RELEASE.jar:2.3.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:330) ~[spring-boot-2.3.1.RELEASE.jar:2.3.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) ~[spring-boot-2.3.1.RELEASE.jar:2.3.1.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.3.1.RELEASE.jar:2.3.1.RELEASE]
at io.reflectoring.kafka.SpringKafkaExampleApplication.main(SpringKafkaExampleApplication.java:12) ~[classes/:na]
2020-12-16 20:46:06.414 INFO 25592 --- [ 1-0-C-1] o.s.k.l.KafkaMessageListenerContainer : reflectoring-user-mc: partitions revoked: [reflectoring-user-0]
Any idea of why this will occur? thanks.
Hi,
I got this compilation error following your excelent course: https://reflectoring.io/spring-boot-exception-handling/
Any clue?
Many thanks
Do you have any idea on how to merge the jacoco reports of a multi module gradle project?
plugins {
id "org.sonarqube" version "2.7"
id 'jacoco'
}
def allTestCoverageFile = "${buildDir}/jacoco/allTestCoverage.exec"
// This seems to be a jacoco task which can be used to merge reports.
task jacocoMerge(type: JacocoMerge, group: 'verification') {
// ??????????????????????????????????????????
}
sonarqube {
properties {
property "sonar.scm.provider", "git"
property "sonar.jacoco.reportPaths", allTestCoverageFile
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'jacoco'
sonarqube {
properties {
property "sonar.jacoco.reportPaths", allTestCoverageFile
}
}
}
project(':projectA') {
dependencies {
compile project(':projectB')
compile project(':projectC')
}
}
project(':projectB') {
dependencies {
compile project(':projectC')
}
}
project(':projectC') {
dependencies {
}
}
Current package.json has 78 vulnerabilities (65 low, 1 moderate, 12 high)
run npm audit fix
to fix them, or npm audit
for details
Need to update the below packages
apollo-cache-inmemory ^1.3.9 → ^1.6.3
apollo-client ^2.4.5 → ^2.6.4
apollo-link-http ^1.5.5 → ^1.5.16
axios 0.18.0 → 0.19.0
graphql ^14.0.2 → ^14.5.8
graphql-tag ^2.10.0 → ^2.10.1
node-fetch ^2.2.1 → ^2.6.0
react ^16.5.2 → ^16.10.1
react-dom ^16.5.2 → ^16.10.1
react-scripts 2.0.5 → 3.1.2
@pact-foundation/pact 7.0.3 → 9.1.1
@pact-foundation/pact-node 6.20.0 → 9.0.4
cross-env ^5.2.0 → ^6.0.0
Currently there are FAIL src/rest/hero.service.test.pact.js
● Test suite failed to run
Jest encountered an unexpected token
This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.
By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".
Here's what you can do:
• To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
• If you need a custom transformation specify a "transform" option in your config.
• If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
You'll find more details and examples of these config options in the docs:
https://jestjs.io/docs/en/configuration.html
Can you add a "ProvisioningException" example?
What I mean by that is an example of catching exception from a misconfigured Bean on Spring-boot startup where, if the Bean fails, it would shutdown spring-boot?
I encounter exceptions like that far more often than exceptions from my own code. Very tough to find an example of this on the internet.
Hi there,
I'm one of the pact maintainers, and we occasionally get people asking questions about the examples you have here, which (while instructive) have one or two bugs in the way that jest is used. Is it possible to update the examples to address these issues?
For instance, in the react example, this code doesn't correctly fail if the heroService
throws an error, because the catch
with done.fail
isn't done at the end of the promise chain. This means the test doesn't trigger the appropriate failure in every error case. To address this, you could either move the done.fail
part to the end of the promise chain, or return the promise to Jest instead of using done
.
it('sends a request according to contract', (done) => {
heroService.createHero(new Hero('Superman', 'flying', 'DC'))
.then(hero => {
expect(hero.id).toEqual(42);
})
.then(() => {
global.provider.verify()
.then(() => done(), error => {
done.fail(error)
})
});
});
Another issue is that the pact server is started on every test in jest-wrapper.js
. This isn't a bug, but means that the log is quite noisy, which makes it harder to debug. For example, if the pact server starts correctly in a test that doesn't need it, but fails in a test that does, then this is not obvious from the current log. It's probably clearer to only start the server in pact tests.
You can get some of these improvements for free with jest-pact
, which was introduced since this example was written, and substantially reduces the need for boilerplate in a jest test. See https://github.com/pact-foundation/jest-pact
You can also entirely avoid the need for publish.js
by using the pact-broker CLI directly in your npm script - see: https://github.com/pact-foundation/pact-js#publish-in-npm-scripts
Awesome article and found your code for the healthcheck... As a reference for readers, I believe the most efficient way for a probe to verify DB connectivity (network + settings) is to verify if it can retrieve anything... I would change the code at https://github.com/thombergs/code-examples/blob/master/spring-boot/spring-boot-health-check/src/main/java/io/pratik/healthcheck/usersignup/DatabaseHealthContributor.java#L25
SELECT 1
from https://reflectoring.io/unit-testing-spring-boot/
Getting error
Mockito cannot mock/spy because :
with test like
verify(lombokInjectedFinalClass, times(1)).method();
Hello,
I tried your sample project on rabbitmq and I've got a question about initialization of configuration for rabbitmq (queues, binding, exchange).
Is there any way to create, on rabbitserver at startup of server spring boot, queues and others ?
Actually, if I don't start the project with your properties to init queues, I need to send a message to rabbit to initiate creation of Queues, bindings...
Thank you.
When I try: git clone https://github.com/thombergs/code-examples/spring-boot/data-migration/liquibase
,
I get this error on my terminal: remote: Not Found fatal: repository 'https://github.com/thombergs/code-examples/spring-boot/data-migration/liquibase/' not found
The issue refers to the Validation with Spring Boot - the Complete Guide post, section Using the Spring Boot Validation Starter
.
I was following the post to implement validation in my Spring Boot v.2.5.4
project that uses solely spring-boot-starter-web
. It turned out that the validation starter does not come for free with the web starter. In fact, I had to manually add the spring-boot-starter-validation
dependency to my pom.xml
file.
I checked the build.gradle file for this project and the validation starter is also explicitly added.
Could you verify this and amend the post?
Hi,
For tracing moudule ,
I got error message:
Internal Server Error (traceId: null)
Can you give me any helps?
Thanks.
Heyang
Hi,
I couldn't figure out how to bind one exchange to different queues while there is only on RabbitMQ instance running. I am not sure maybe this can be achieved by running a rabbitmq cluster. Anyway, I think the commands for subscribers in "Usage" part should be like this:
./gradlew bootrun -Dspring.profiles.active=subscriber -Dsubscriber.queue=service1Queue -Dsubscriber.routingKey=customer.*
./gradlew bootrun -Dspring.profiles.active=subscriber -Dsubscriber.queue=service1Queue -Dsubscriber.routingKey=.*created
./gradlew bootrun -Dspring.profiles.active=subscriber -Dsubscriber.queue=service1Queue -Dsubscriber.routingKey=*.*
https://github.com/thombergs/code-examples/tree/master/resilience4j/bulkhead
F:\nag\DWork\osource\experiments\java\nfrs\resilience\resilience4j\sb\ex3\bulkhead>mvn build
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------< io.reflectoring.resilience4j.bulkhead:bulkhead >------------------------------------
[INFO] Building bulkhead 1.0-SNAPSHOT
[INFO] from pom.xml
[INFO] ---------------------------------------------------------[ jar ]----------------------------------------------------------
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] Total time: 0.155 s
[INFO] Finished at: 2023-08-21T16:51:45+05:30
[INFO] --------------------------------------------------------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase "build". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Availa
ble lifecycle phases are: pre-clean, clean, post-clean, validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, pro
F:\nag\DWork\osource\experiments\java\nfrs\resilience\resilience4j\sb\ex3\bulkhead>mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------< io.reflectoring.resilience4j.bulkhead:bulkhead >------------------------------------
[INFO] Building bulkhead 1.0-SNAPSHOT
[INFO] from pom.xml
[INFO] ---------------------------------------------------------[ jar ]----------------------------------------------------------
[INFO]
[INFO] --- resources:3.0.2:resources (default-resources) @ bulkhead ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory F:\nag\DWork\osource\experiments\java\nfrs\resilience\resilience4j\sb\ex3\bulkhead\src\main\resources
[INFO] skip non existing resourceDirectory F:\nag\DWork\osource\experiments\java\nfrs\resilience\resilience4j\sb\ex3\bulkhead\src\main\resources-filtered
[INFO]
[INFO] --- compiler:3.8.0:compile (default-compile) @ bulkhead ---
[WARNING] The POM for org.apache.maven.wagon:wagon-http:jar:1.0-beta-6 is invalid, transitive dependencies (if any) will not be available, enable verbose output (-X) for more details
[WARNING] The POM for org.apache.maven.wagon:wagon-webdav-jackrabbit:jar:1.0-beta-6 is invalid, transitive dependencies (if any) will not be available, enable verbose output (-X) for more details
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 7 source files to F:\nag\DWork\osource\experiments\java\nfrs\resilience\resilience4j\sb\ex3\bulkhead\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /F:/nag/DWork/osource/experiments/java/nfrs/resilience/resilience4j/sb/ex3/bulkhead/src/main/java/io/reflectoring/resilience4j/bulkhead/utils/RequestTrackingIdPropagator.java:[3,39] cannot find symbol
symbol: class ContextPropagator
location: package io.github.resilience4j.bulkhead
[ERROR] /F:/nag/DWork/osource/experiments/java/nfrs/resilience/resilience4j/sb/ex3/bulkhead/src/main/java/io/reflectoring/resilience4j/bulkhead/utils/RequestTrackingIdPropagator.java:[9,53] cannot find symbol
symbol: class ContextPropagator
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] Total time: 1.730 s
[INFO] Finished at: 2023-08-21T16:51:57+05:30
[INFO] --------------------------------------------------------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project bulkhead: Compilation failure: Compilation failure:
[ERROR] /F:/nag/DWork/osource/experiments/java/nfrs/resilience/resilience4j/sb/ex3/bulkhead/src/main/java/io/reflectoring/resilience4j/bulkhead/utils/RequestTrackingIdPropagator.java:[3,39] cannot find symbol
[ERROR] symbol: class ContextPropagator
[ERROR] location: package io.github.resilience4j.bulkhead
[ERROR] /F:/nag/DWork/osource/experiments/java/nfrs/resilience/resilience4j/sb/ex3/bulkhead/src/main/java/io/reflectoring/resilience4j/bulkhead/utils/RequestTrackingIdPropagator.java:[9,53] cannot find symbol
[ERROR] symbol: class ContextPropagator
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the '-e' switch
[ERROR] Re-run Maven using the '-X' switch to enable verbose output
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
F:\nag\DWork\osource\experiments\java\nfrs\resilience\resilience4j\sb\ex3\bulkhead>
I cloned the project, I did the build and at the time of running it has an error in the creation of the EntityManagerFactory.
Hello, while reading this article I noticed you are declaring KafkaProducerConfig
and KafkaConsumerConfig
classes.
These classes are not necessary for a Spring Boot application: Spring Boot – unlike Spring – comes with simplified Apache Kafka support by providing auto-configuration, meaning that Kafka configuration is controlled by external configuration properties in spring.kafka.*
and does not require to add any Java code.
I think it would be a better example for your readers to have a controller base class method like:
private static final NOT_FOUND = ResponseEntity.notFound().build();
protected Mono<ResponseEntity<T>> OkOrNotFound(Mono<T> result){
return result.map(ResponseEntity::ok).defaultIfEmpty(NOT_FOUND);
}
In use it's now just
return OkOrNotFound(result);
I would like to visualize the activities from my event output. How to do it? Is there any example code?
In your Spring Boot Test article you reference JUnit-Insights towards the end to gather information about the time it takes to run tests. I'd really like to get this dependency working but I can't get it to work. Do you have any info on how to get it to work?
First off, I can't find the jar anywhere. But I was able to build it with this command:
docker run -v ~/Documents:/hostDocuments -it --user root gradle:4.6-jdk8-alpine sh -c "apk update && apk add git && git clone https://github.com/adessoSE/junit-insights.git && cd junit-insights && gradle jar && cd .. && cp -R junit-insights /hostDocuments/."
And I can get the dependency in my project using the instructions on their readme for local development, but I still can't get any reports to be generated.
I'd appreciate any help I can get to get this to work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.