gur*_*boy 7 java orm spring ibatis
当我调试JdbcTemplate源代码使用IDEA时,IDE提示我:'源代码与字节码不匹配'
截图:

我使用mvn来管理我的项目;我的maven pom配置是:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.orm</artifactId>
<version>3.0.5.RELEASE</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
当编译的代码与源代码不匹配时,Intellij 会发出这样的警告,即您尝试调试代码但它已更改且未重建。
确保导入代码后没有对其进行修改。如果您进行修改,则在启动调试器之前首先构建/编译它。
例如下面的代码将导致此警告:-
public class HelloSO {
public static void main(String[] args) {
System.out.println("First time source code");
}
}
Run Code Online (Sandbox Code Playgroud)
现在您编译了上面的类并开始调试它,一切正常。
但之后,您再添加一个打印语句,并尝试将调试点放在该行上而不重新编译它,那么在这种情况下,不会生成新行的字节代码,因此您将从 IntelliJ 收到相同的警告。
| 归档时间: |
|
| 查看次数: |
7700 次 |
| 最近记录: |