Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 20:14
    jakubskalak synchronize #31516
  • 19:24
    jakubskalak synchronize #31516
  • 14:48
    aspan commented #28637
  • 12:48
    wilkinsona commented on 7abc7df
  • 12:48

    wilkinsona on main

    Polish See gh-31253 Merge branch '2.7.x' (compare)

  • 12:48

    wilkinsona on 2.7.x

    Polish See gh-31253 (compare)

  • 11:31
    dreis2211 commented on 7abc7df
  • Jun 24 20:21
    scottfrederick assigned #31233
  • Jun 24 17:02

    wilkinsona on 2.7.x

    Allow PEM certificates to be us… (compare)

  • Jun 24 17:02
    wilkinsona closed #31529
  • Jun 24 17:02
    wilkinsona closed #31253
  • Jun 24 17:02

    wilkinsona on main

    Allow PEM certificates to be us… Merge branch '2.7.x' Closes gh… (compare)

  • Jun 24 17:02
    wilkinsona milestoned #31253
  • Jun 24 17:02
    wilkinsona demilestoned #31253
  • Jun 24 17:01
    wilkinsona milestoned #31529
  • Jun 24 17:01
    wilkinsona labeled #31529
  • Jun 24 17:01
    wilkinsona labeled #31529
  • Jun 24 17:01
    wilkinsona opened #31529
  • Jun 24 16:29
    wilkinsona commented #31517
  • Jun 24 16:27
    wilkinsona commented #31528
X.Sun
@XSun771
should it not happen that use applicationContext in a Bean to use its method "getBean()"?Why it is so complex, for example, to implement the ApplicationContextAware. why is it still not achieved that use @Autowired ApplicationContext context to get a context? Thanks...
Stéphane Nicoll
@snicoll
you can do that
Altough getting a bean programmatically is not really a mainstream use case IMO
(or getting a reference to the ApplicationContext for that matter)
Subodh Sharma
@subodh_atg_twitter

I am getting the below response when run application on Netty server. But i do not want to include the xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" if value is null/blank.
<employeeResponse>
<employee>
<empId>1000</empId>
<firstName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<lastName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<salary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
<status xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
</employee>
</employeeResponse>

When I run the same application on Netty Server, getting the proper response. Can anyone help me to get the below response on the netty server?
<employeeResponse>
<employee>
<empId>1000</empId>
<firstName />
<lastName />
<salary />
<status />
</employee>
</employeeResponse>

I am using Spring boot
In my project Netty server is used and can not move to Tomcat server
James Howe
@OrangeDog

I don't suppose there's a way to have a fallback static error page for when your normal error page fails?

That was a no then I guess

Yogesh Patel
@YogeshPat3l_gitlab
Can anyone please help me how to serve static pages from outside the jar in spring boot ?
Vyacheslav N. Boyko
@bvn13
@YogeshPat3l_gitlab http://<server>:<port>/<static-resource>
Yogesh Patel
@YogeshPat3l_gitlab

@bvn13 This works if the static content is within the jar itself in any of the following paths

"classpath:/META-INF/resources/",
"classpath:/resources/", "classpath:/static/", "classpath:/public/"

@bvn13 What I want is to put all the static pages outside the jar
Vyacheslav N. Boyko
@bvn13
@YogeshPat3l_gitlab https://spring.io/blog/2013/12/19/serving-static-web-content-with-spring-boot :
Spring Boot will automatically add static web resources located within any of the following directories:

    /META-INF/resources/
    /resources/
    /static/
    /public/
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
    registry
      .addResourceHandler("/files/**")
      .addResourceLocations("file:/opt/files/");
 }
hope it helps you
Jacques-Etienne Beaudet
@jebeaudet
@bclozel looks like it's an issue with our internal maven repo, never seen that one before so didn't think to look there. By switching to maven central it downloaded the release properly. thanks and sorry for the noise!
Stéphane Nicoll
@snicoll
This message was deleted
Jacques-Etienne Beaudet
@jebeaudet
Regarding the previous message, our internal repository was configured with maven central in http and this is not supported anymore as of January 15th, 2020 https://support.sonatype.com/hc/en-us/articles/360041287334. All I had to do is point to the proper upstream maven repository and it worked. I'm guessing mvnrepository might have the same problem!
Scott Frederick
@scottfrederick
@jebeaudet Glad you got it resolved. Note that if your internal repo is also mirroring repo.spring.io (e.g. for Spring milestones or snapshots), you’ll need to make a similar change. https://spring.io/blog/2019/09/16/goodbye-http-repo-spring-use-https
JavaBaseReviewCN
@xuanjinnan
guys,I want create log of my normal spring boot with strategy of saveing a month log,example day,I want it is from 2019-12-22 to 2020-01-21 and tomorrow 2019-12-23 to 2020-01-22,better can study at a offical URL,I don't find it!
Himanshu Shukla
@himanshushukla254
Hi, I want to run multiple short-lived java applications in isolation.
is there any particular framework / approach I should follow ?
Vyacheslav N. Boyko
@bvn13
@xuanjinnan you could search in google by "slf4j log4j rotation" https://examples.javacodegeeks.com/enterprise-java/log4j/log4j-rotation-example/ is an example
@himanshushukla254 what kind of isolation do you prefer? maybe Docker?
Himanshu Shukla
@himanshushukla254
@bvn13 - no, they are very small applications. Dockerizing them requires a lot of time and effort
they are like health monitors which were running based on cron. Now, we are migrating them to QuartzScheduler but i can see a lot of logging issue.
Since each file is configuring their own log4j and DomConfigurator/ PropertyConfigurator changing the whole log tree structur.
at first level, logger isolation is also enough
Vyacheslav N. Boyko
@bvn13
@himanshushukla254 Do you place your applications into one jar? If not you could adjust logging into separated folders.
Himanshu Shukla
@himanshushukla254
@bvn13 There are multiple jar files, we are loading the application classes using dynamic class loader. however, there can be a jar from where we are loading more than one classes
Vyacheslav N. Boyko
@bvn13
@himanshushukla254 did you try to use different FileAppenders for your applications?
Himanshu Shukla
@himanshushukla254
@bvn13 yes, i tried it. There are some places where we are using DOMConfigurator also and as per my understanding it changes the whole log tree.
and because of this, application logs are getting messed up.
@bvn13 if i am configuring the property other files, the main logger is also getting changed to the new property i added.
Michael Vandendriessche
@miva2
Hello everyone, I have a question about using Microsoft Azure Storage with Spring-boot.
Can anyone point out the difference between following 2 dependencies?
azure-storage-spring-boot-starter (as used in this example https://github.com/microsoft/azure-spring-boot/tree/master/azure-spring-boot-starters/azure-storage-spring-boot-starter)
azure-storage-spring-boot-starter (https://docs.microsoft.com/en-us/azure/java/spring-framework/spring-boot-starters-for-azure)
I want to save .pdf and .properties files and then read them.
I've seen both being used but don't know which one is better for me to use.
Thanks in advance!
Ahmed Rebai
@Rebaiahmed
Hello everyone , I have a question : Spring data Mongodb how to find the last element inserted !
Stéphane Nicoll
@snicoll
@Rebaiahmed there is a #spring-data channel for questions like that. I believe this SO answer should help you: https://stackoverflow.com/questions/4421207/how-to-get-the-last-n-records-in-mongodb
Konstantin Bläsi
@konstantinblaesi
transaction propagation REQUIRES_NEW requires a new/separate connection from the db connection pool is that right?
Konstantin Bläsi
@konstantinblaesi
I think we were running into some deadlock situation with the hikari connection pool because we were using REQUIRES_NEW in places we should not have and too many such transactions were somehow nested for an API call?
Michael Vandendriessche
@miva2
Oops, sorry, I mentioned the same dependency twice in my earlier question.
I would like to know the differences between the spring-azure-starter-storage and azure-storage-spring-boot-starter dependencies. After some more research, and some rubberducking, I think I need the spring-azure-starter-storage as mentioned in this article https://docs.microsoft.com/en-us/azure/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-storage.
Andrew Jackson
@sonAndrew
Hey @everyone I truly need help with this simple code sample that I cannot see a problem with.
Screen Shot 2020-01-21 at 10.30.58 AM.png
I got this error
Screen Shot 2020-01-21 at 10.30.44 AM.png
boda2004
@boda2004
@sonAndrew can you try replacing conversion d with f and probably change howMany type from int to float/double?
also i suppose it's about java in general and not spring-boot specific :)
Andrew Jackson
@sonAndrew
Hey @boda2004 the variable howMany is supposed to only hold an integer
boda2004
@boda2004
but why you try to format integer with two digits after dot?
Andrew Jackson
@sonAndrew
LMFAO!!! THANK YOU SO MUCH!!!