Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Function argument from file with a dynamic value

  1. #1
    Junior Member
    Join Date
    Aug 2017
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Function argument from file with a dynamic value

    I have a command that takes a search query in xml format as an argument.
    The xml is quite big so I dont want it in the source code, I was thinking if I could put it in the resources folder and somehow read it and replacing a dynamic value (the search word) using a placeholder and shove it into the function.
    I'm using Spring Boot 2.
    Is there some functionality to do this in the spring framework or should I just create a reader and do it with a string replace?

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    21,897
    Thanks
    52
    Thanked 2,335 Times in 2,291 Posts

    Default Re: Function argument from file with a dynamic value

    Also posted at: https://www.dreamincode.net/forums/t...dynamic-value/
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Letter grade isn't printing from the function to the output file...HELP!
    By 112297 in forum File I/O & Other I/O Streams
    Replies: 7
    Last Post: November 22nd, 2012, 10:12 AM
  2. Frustrating File>save as search function in google script
    By segreto in forum Other Programming Languages
    Replies: 2
    Last Post: August 16th, 2012, 12:40 PM
  3. [SOLVED] Send File (path) as argument to method
    By efluvio in forum What's Wrong With My Code?
    Replies: 3
    Last Post: May 31st, 2011, 01:13 PM
  4. Argument promotion
    By u-will-neva-no in forum Java Theory & Questions
    Replies: 3
    Last Post: May 16th, 2011, 07:02 AM
  5. [SOLVED] Command Line Argument Help
    By EmSaint in forum Loops & Control Statements
    Replies: 2
    Last Post: January 28th, 2010, 09:55 AM