I was following the following basic spring batch tutorial https://spring.io/guides/gs/batch-processing/ .
I am using IntelliJ 14 and created a Spring-Batch project
I am using Mavin. And I have pom.xml file.
Mvn clean install works fine even though the Application.java shows me "Couldn't autowire. No beans of jdbcTempalte type can be found" @Autowired JdbcTemplate jdbcTemplate;
Spring-config has the following
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
I am getting an error when I try to do mvn spring-boot:run
The cause by shows Caused by: org.hsqldb.HsqlException: user lacks privilege or object not found: PEOPLE
What am I missing? I appreciate your help.
You should put schema initialisation in your src/main/resources
. Spring batch automatically runs schema-@@platform@@.sql
during startup and -all
tells it to be for all platforms as noted in readme.adoc
on github:
Next, you write a SQL script to create a table to store the data.
src/main/resources/schema-all.sql
link:initial/src/main/resources/schema-all.sql
Note: Spring Boot runs schema-@@platform@@.sql automatically during startup. -all is the default for all platforms.