Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Apr 03 2020 13:10
    @jameskleeh banned @orubel
  • Mar 30 2020 18:39
    @graemerocher banned @BeApi_io_twitter
  • Mar 30 2020 16:34
    @graemerocher banned @orubel
vyasamit
@vyasamit
any pointer for multipel will be helpfull
James Kleeh
@jameskleeh
@vyasamit I’m not sure how that code example relates to an email. Is that a client or server?
vyasamit
@vyasamit
@jameskleeh its server side POST call
this exampel if for simaple attachment
i want to develop api for multiple
James Kleeh
@jameskleeh
You can do Publisher<CompletedFileUpload> to handle multiple parts with the same name
vyasamit
@vyasamit
sure will look into that
thanks james
James Kleeh
@jameskleeh
The docs give all the examples
vyasamit
@vyasamit
awasoem thanks
Ashish Sharma
@ashish-sharma09
Hey guys, with latest Micronaut version 2.1.2, we noticed that creating ApplicationContext within a test and replacing application bean with a mock bean using registerSingleton method of context creates two beans with same underlying mock instance, opened an issue here: micronaut-projects/micronaut-core#4420 yesterday.
This was working fine with previous version we used: 2.0.3
10 replies
Sebastian Lillo Navarro
@slillo-coriolis_gitlab
Hi, moving from grails to micronaut + nuxt, I'd love to use GORM in production but I see it has "preview" in the name. When do you think it will be safe to use it?
James Kleeh
@jameskleeh
Its preview because its a milestone release I believe. We needed to use the milestone because of Groovy 3
It will be out of preview once a 7.1.0 release is out there
In general I wouldn’t be that concerned, but that is just my opinion
Sebastian Lillo Navarro
@slillo-coriolis_gitlab
Thanks James, I'll give it a try
1 reply
Sascha Frinken
@sfrinken_gitlab
Thank you for the release! You are awesome.
James Kleeh
@jameskleeh
No problem
keenz
@kindlychung
Anyone has run into java.lang.IllegalStateException: cannot send more responses than request before?
I got that after upgrading to 2.2.0.
1 reply
Abhishek Kumar
@abhikumarblume
Hello Guys,,, . In Springboot, just by adding sleuth dependency , we can see 'traceId' and 'spanId' in STS console. I am trying to mimic similar functionality in micronaut using Intellij . I tried injecting dependency implementation "io.micronaut:micronaut-tracing" along with use of annotation 'io.micronaut.http.annotation.NewSpan' at controller. But i am not able to see 'traceId' in Intelli console ? do i have to override logback.xml file ?
Vinicius Carvalho
@viniciusccarvalho
@abhikumarblume You will need a reporter for this, it's possible to have your own custom zipkin2.reporter.Sender as per the docs https://docs.micronaut.io/latest/guide/index.html#zipkin on the "Customizing Zipkin" section
add the libraries and provide a Bean of type "Sender"
Marwan Rabbâa
@waghanza
Hi,
I try to update micronaut in the-benchmarker/web-frameworks#3592 for a benchmarking project. Since I'm not a java guy, could somebody check the implementation in https://github.com/the-benchmarker/web-frameworks/tree/master/java/micronaut
4 replies
?
Abhishek Kumar
@abhikumarblume

Hello Guys,,, . In Springboot, just by adding sleuth dependency , we can see 'traceId' and 'spanId' in STS console. I am trying to mimic similar functionality in micronaut using Intellij . I tried injecting dependency implementation "io.micronaut:micronaut-tracing" along with use of annotation 'io.micronaut.http.annotation.NewSpan' at controller. But i am not able to see 'traceId' in Intelli console ? do i have to override logback.xml file ?

For micronaut 2.2.1, i was able to get 'X-B3-TraceId' in ResponseHeader and logs by adding below code: - 1) logback.xml <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<withJansi>false</withJansi>
<!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%cyan(%d{HH:mm:ss.SSS}) %gray([%thread]) %highlight(%-5level) %magenta(%logger{36}) - [%X{X-B3-TraceId:-},%X{X-B3-SpanId:-}] %msg%n</pattern>
</encoder>
</appender>
2) build.gradle
implementation "io.micronaut:micronaut-tracing"
implementation 'io.opentracing.brave:brave-opentracing' 3) application.yml tracing:
zipkin:
enabled: true My project has KafkaListner. 1 weird issue which i saw was if i annotate my class with @kafkaListner then response header doesnot contain 'X-B3-TraceId'. When i move to to methodlevel then response header contains 'X-B3-TraceId'.

Aleksandr Izmaylov
@zinoviy23
Hi! Is it possible to add retrying for connection for @RabbitListener? I have a situation when my service is started, but Rabbit MQ is not yet.
Currently, I try to hack RabbitConnectionFactory by replacing it with my @Factory which tries to connect with N attempts.
James Kleeh
@jameskleeh
Is that not working for you?
Aleksandr Izmaylov
@zinoviy23
It works but looks like a hack
Mohit Gupta
@mohit2491

Hello all, I’m using declarative http client in micronaut to get call a REST web service.
As per the documentation, I can declare my httpclient as -
HttpResponse<Pet> getData(some query parameter);

Now I have two subclasses of Pet - Let’s say Dog and Cat having their specific member variables respectively

Now when my app calls this service it is returning an instance of Dog or Cat with Dog or cat attributes, such child object specific information(state of Dog or Cat) is getting lost at client side as return type is ‘Pet’…

can anyone assist here - would like to know How I can leverage httpclient to get child objects as response even though the declarative client is of parent type

I’m able to get memeber variables only which is declared in Pet class
James Kleeh
@jameskleeh
@mohit2491 you have to inform Jackson how to deserialize the json
Mohit Gupta
@mohit2491
@jameskleeh thanks for your inputs. It worked.
keenz
@kindlychung
How do I register a jackson module in micronaut?
James Kleeh
@jameskleeh
just make it a bean
keenz
@kindlychung
For example I'd like to do this:
mapper.registerModule(new VavrModule());
for all the mappers.
@jameskleeh so in this case i need to make a VavrModule a bean?
James Kleeh
@jameskleeh
is VavrModule your class?
keenz
@kindlychung
no.
James Kleeh
@jameskleeh
It should be added automatically
keenz
@kindlychung
ah, great, so there is nothing to do about it?
James Kleeh
@jameskleeh
right
keenz
@kindlychung
thanks!
sakis kaliakoudas
@skaliakoudas_twitter
Hello, I seem to be stumbling across this issue oracle/graal#2742 with the Micronaut 2.2.x versions. The previous 2.1.x versions don't have this issue.
5 replies