How to access beans from the applicationContext.xml in my service layer.

I am working on a Spring Web MVC project and that issue is that my service layer needs a URL, User ID and Password to do a web post to a server to save my data.  I dont want to hardcode the URL, User ID and password in the Java Code of the Service Layer so I would like to put them into the applicationContent.xml file but I dont know how to access them from the service layer.

Can someone please help me out with this..  example code would be great.


Question: How to update an SQL column using a known perm link while appending a value from another column within the same table?
Answer: Welcome to StackExchange.  This is a great site to get help, and thank you for the picture, it was helpful, however it always helps if you put in an extra bit of effort when asking for a question so it doesn't get voted down.  Now on to the question.

In MS SQL Server (using TSQL, but you can do it with ANSI SQL as well) I would create a temp table with a row ID so I could while loop through it.  Then I would select each row, pass in the row info as a variable, and dynamically generate a query or just execute it.  I would recommend dynamically generating the query, testing it, then running it.

Step 1: Populate the column with the 'path to something'

Step 2:

select ID, NAME, evidence
INTO #TempTbl
from TblName


Step 3: Create a while loop to go through each row and dynamically assign the value in "name" to append to the end of the "evidence" line

DECLARE @LoopId INT
SELECT @LoopId = 1
WHILE @LoopId &lt; (Select COUNT(*) +1 FROM #TempTbl)


DECLARE @Id nvarchar(10)
SET @Id = (SELECT TOP 1 id from #TempTbl)
DECLARE @Evidence NVARCHAR(rowlength)
SET @Notes = (SELECT TOP 1 Evidence from #TempTbl)
DECLARE @Name NVARCHAR(max)
SET @Name = (select top 1 NotOptimalDetail from #TempTbl)

DECLARE @SQLCMD NVARCHAR(max)
SET @SQLCMD=
'UPDATE DbName.dbo.TblName
SET Evidence = ' + ''''+ @Evidence + '\' +  @Name + '''' + '
WHERE id = ' + @Id 
EXEC (@sqlcmd)

DELETE FROM #TempTbl WHERE @Id = ID
SET @Id = ID + 1


Make your modifications where needed to get it to run in MySQL but it should be very similar.