I have a little problem. I hope someone can help me.
I'm developping an application for my thesis. Now I have an application-context.properties.txt开发者_如何学Python where I define:
host= (ip address)
port=8080
Now this is static and I change the ip address to the server I want to connect to. But this isn't verry usefull for the user because he can't access that file.
Now is my question can I change this host ip address from in my flex code? And how do I do that.
Hope someone can help me.
Kind regards,
Thibault Heylen
Usually Configurations i.e services.xml embeds at compile time, this blog
Externalizing Service Configuration using BlazeDS and LCDS
pointed towards way to Externalizing Service Configuration,
hopes that works,
Looking at the documentation, the FlexXMLApplicationContext
is just one example of an application context. Possibly, you can derive from it or the XMLApplicationContext
to allow for runtime changes to configuration variables, if the context class doesn't support it already?
You won't be able to change the value in the XML file itself, since it is a compiled resource, but you should be able to extend SpringAS to do what you want at runtime.
精彩评论