英文:
Spring Batch and Intellij Plugin
问题
When using JdbcTemplate in IntelliJ, the IDE is smart enough to recognize and validate SQL statements against a database schema. I'm not able to get the same behavior from IntelliJ for JdbcCursorItemReader and the SQL used to create the Spring batch reader. Is there a setting or 'trick' to get IntelliJ to become aware of the SQL statements like the example below - just like IntelliJ does for JdbcTemplate?
JdbcCursorItemReader<Person> reader = new JdbcCursorItemReader<>();
reader.setDataSource(rosaDataSource);
reader.setSql("SELECT email, id, created_on from users");
reader.setRowMapper(new UserMapper());
reader.setFetchSize(25);
return reader;
英文:
When using JdbcTemplate in Intellij the IDE is smart enough to recognize and validate SQL statements against a database schema. I'm not able to get the same behavior from Intellij for JdbcCursorItemReader and the SQL used to create the Spring batch reader. Is there a setting or 'trick' to get Intellij to become aware of the SQL statements like the example below - just like Intellij does for JdbcTemplate?
JdbcCursorItemReader<Person> reader = new JdbcCursorItemReader<>();
reader.setDataSource(rosaDataSource);
reader.setSql("SELECT email, id, created_on from users");
reader.setRowMapper(new UserMapper());
reader.setFetchSize(25);
return reader;
答案1
得分: 3
> 在“上下文操作”弹出菜单中,您可以注入SQL语言支持以获得针对SQL的特定完成,以下是屏幕截图:
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论