idea maven不会自动下载依赖的源码,所以要通过命令行来辅助下载
1. 下载当前项目所有依赖的source和javadoc
这个(下载source)
mvn dependency:sources
或这个(下载source)
mvn dependency:sources -DdownloadSources=true
或这个(下载javadoc)
mvn dependency:sources -DdownloadSources=true -DdownloadJavadocs=true
2. 下载指定jar包的source
mvn dependency:get -Dartifact=org.thymeleaf:thymeleaf-spring5:3.0.11.RELEASE:jar:sources
快速复制artifact的方法:

image.png
最后复制这个地方就行了

image.png