bluemagicsource / magic-config-service

RESTful remote property repository
5 stars 5 forks source link

Dynamically lookup server url #12

Closed jackrod closed 12 years ago

jackrod commented 12 years ago

Richard,

Currently this is hard coded in the spring xml file "localhost:8080". We need to have the server ask the WebContext where it is located and automatically set the "baseUri" field in the context file.

~Jack

jackrod commented 12 years ago

Here are some pointers to get you started...

rgarci87 commented 12 years ago

Hello Jack!

Requesting code review for this issue. Revision 104.

jackrod commented 12 years ago

I took a look at the code and I like what I'm seeing. Down the road we should consider moving the baseurl to the PropertyServiceImpl in the future. Here's why: the baseurl will always be mandatory for the server no matter what repository implementation we use. The DatabaseRepository shouldn't care about baseurl's as it has no concept of the web tier, it should only know about the database layer.

So far so good, and... IT WORKS! I deployed to the sandbox server:

http://dev.sofiac.us:8080/magic/property/abc

Check it Out! ~Jack