How to use flask to make a webservice? that contains various functions and can be called by a third party

I am a rookie in FLASK. Now I want to use FLASK to put a series of functions into a webservice, which can be called by a third party with Java (there is no need to write the interface for the time being, only a function interface is needed). Recently, I have seen some things about FLASK, but I still have a lot of questions. Take the following small project as an example:

create a new FLASK project using VS2015, and write the function I need to encapsulate in the views.py file. The function is to pass a name of string type and return "hello name":

"""
Routes and views for the flask application.
"""

from datetime import datetime
from flask import render_template
from flask import Flask
from FlaskWebProject1 import app

app = Flask(__name__)

@app.route("/")
@app.route("/greeting",methods = ["GET"])
def greeting(name):
    return ("hello"+name)

if __name__ == "__main__":
    app.run(debug=True)

if I want to encapsulate this greeting () function, should it be written as above? What else do I need to do in order for the webservice containing this function to be called by a third party using Java? How to judge the success of the webservice? Thank you for your attention.

Mar.06,2021

-sharp get
-sharp webapi
-sharp :http://docs.jinkan.org/docs/flask/quickstart.html-sharpa-minimal-application

-sharp 
-sharp 1. '/''/greeting'
-sharp :
-sharp ===============
-sharp @app.route('/')
-sharp def index():
-sharp   pass
-sharp ===============
-sharp @app.route('/greeting',methods = ["GET"])
-sharp def greeting():
-sharp   pass
-sharp ===============
@app.route('/')
@app.route('/greeting',methods = ["GET"])
-sharp name
-sharp ===============
-sharp :
-sharp url /greeting/tom 
-sharp name 'tom'
-sharp @app.route('/greeting/<name>',methods = ["GET"])
-sharp def greeting(name):
-sharp ===============
-sharp :
-sharp urlparam /greeting?name=tom
-sharp @app.route('/greeting',methods = ["GET"])
-sharp def greeting():
-sharp   name = flask.request.args.get(name)
-sharp ===============
def greeting(name):
    return ("hello"+name)
    
-sharp api
-sharp java http 
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eaacc9-2004.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eaacc9-2004.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?