There are a lot of confusions about the medieval doctrine of the four senses of Scripture, particularly as it is found in Aquinas. I will simply point out some aspects of the doctrine that are often misunderstood.
* The distinction between figurative and literal senses on the one hand, and the distinction between spiritual and literal senses on the other, are entirely different. 'Literal sense' does not mean the same thing in these contrasts. This shouldn't have been too difficult to figure out, since in medieval terms the former distinction would usually be called 'improper' and 'proper' rather than 'figurative' and 'literal'; but I have met an astounding number of people who never do figure it out.
* The distinction between spiritual and literal senses is an entirely different distinction from that between univocal and equivocal senses. Again, this shouldn't be too difficult to figure out (the two are never discussed in the same context, the latter has to do with predication while the former does not, the latter requires comparison of at least two instances while the former does not, Aquinas explicitly denies that the two distinctions are the same, etc.) but one can't be too sure about these things: I have met people, bright people, who have made this mistake, besides the fact that there is absolutely no good reason why the two distinctions would be conflated (one can understand in the above case, but this one makes less sense).
* In Thomistic terms, the spiritual senses of Scripture are, in a sense, not textual senses at all. All purely textual meaning, whether figurative or nonfigurative, falls within the literal sense of Scripture. The spiritual senses of Scripture are the meaning of that to which the text refers: in the case of historical description, the spiritual sense is the symbolic character, established through divine providence, of the actual historical events.
* A single text can have many different but equally valid literal senses. Part of this in Aquinas is due to Augustine, from whom he learned not to reject interpretations of the text put forward by holy people that cannot be shown to be false or absurd. There is another element operating, however, namely, the Second Council of Constantinople, which (albeit vaguely) insists that some Psalms are about Christ. Thus, a messianic Psalm can have a literal meaning related to the particular situation in which it was written and a literal Messianic meaning that directly describes, prophetically, the person of Christ.
* The four senses are not modes of reading. This is where the most reasonable errors are made; because the same words (e.g., 'spiritual', 'allegorical', 'literal', etc.) are often also used for ways of reading the text (this, I think, is what most people are thinking about when talking about 'allegorical interpretations'). The four senses, however, are ways in which God reveals truth: He does so through word (literal) and through fact (spiritual).
Keeping these in mind, go and read ST 1.1.10, which is the basic summary of the doctrine of the fourfold sense of Scripture.
This approach to understanding Scripture essentially follows the lead of Scripture itself. Consider, for instance, the discussion of Hagar and Sarah in Galatians 4. Here we have a textual meaning (the story of Hagar and Sarah), but Paul treats the events narrated as having a spiritual meaning as well (the two covenants). Similar things might be said of the use of Scripture in Hebrews. The fourfold sense is the recognition that not only does the text of Scripture have a literal meaning, but also that the things described by that text have a spiritual meaning, through God's divine authorship. The whole point of the doctrine of the fourfold sense is that we must learn how to read Scripture from Scripture itself.