2 Samuel 12:24–25 (ESV)

24 Then David comforted his wife, Bathsheba, and went in to her and lay with her, and she bore a son, and he called his name Solomon. And the LORD loved him

The Bible indeed tells us that God was angry with Solomon (see 1 Kings 11:9) at the end of his life and the joy about Solomon’s kingdom seems a bit premature when you look at the outcome of Solomon’s reign. That was pure destruction. But God’s plan does not break. It is the figure of his own Son and King that God sees rising—according to his eternal plan—behind Solomon. That is Jesus, the only true Son of David. And when Jesus is anointed as King, the heavens burst open and you hear the joy: This is him; this is him; Jedidiah, My beloved. You hear this in these words:

“As soon as Jesus was baptized, he went up out of the water. At that moment heaven was opened, and he saw the Spirit of God descending like a dove and alighting on him. And a voice from heaven said, This is my Son, whom I love; with him I am well pleased.” (Matthew 3:16–17)