One of the prettiest temples in Shanghai, and I used to live opposite it in my first house in Shanghai in 2002. It went thorough a very big, but needed renovation for some years that was completed 2010.
The temple was built in 247 AD in the Wu Kingdom during the Three Kingdoms period of ancient China. It was then located beside the Suzhou Creek, it was relocated to its current site in 1216 during the Song Dynasty. The current temple was rebuilt in the Qing Dynasty but, during the Cultural Revolution, the temple was converted into a plastic factory. In 1983, it was returned to its original purpose.