If you really want to get rid of the warnings, one thing you can do is create a class that extends from the generic class.
For example, if you're trying to use
private Map<String, String> someMap = new HashMap<String, String>();
You can create a new class like such
public class StringMap extends HashMap<String, String>()
{
// Override constructors
}
Then when you use
someMap = (StringMap) getApplicationContext().getBean("someMap");
The compiler DOES know what the (no longer generic) types are, and there will be no warning. This may not always be the perfect solution, some might argue this kind of defeats the purpose of generic classes, but you're still re-using all of the same code from the generic class, you're just declaring at compile time what type you want to use.