Spring-boot-oracle Spring-batch

Source: Internet
Author: User
Tags postgresql

Install/configure Oracle Express
    1. Oracle XE installer for Linux (I-don ' t care if you ' re running Linux or isn't, this guy is going in a VM): Http://www.oracle. Com/technetwork/database/database-technologies/express-edition/downloads/index.html
    1. sqlplus /nolog
    2. connect sys as sysdba
Oracle JDBC Driver Shenanigans
    1. Download the JDBC driver:http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html
    2. Here's where things get interesting. Apparently gradle can ' t load this jar from a flatFile repository. So the workaround are to create a local MAVEN repository and load this 1 jar into it.
    3. cdTo the directory where the Ojdbc jar is located
    4. mvn install:install-file -Dfile=ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.4 -Dpackaging=jar
    5. The above command make sure to adjust the file, Artifactid, and version to match the driver you downloaded.

Https://github.com/shawn-mcginty/spring-boot-oracle-example

How to copy from CSV file to the database.

Https://github.com/wbotelhos/spring-batch-flat-file-database

Start spring batch with spring boot to read the CSV file and use Hibernate to insert the MySQL database

Https://github.com/zyongjava/spring-batch

Spring-batch-jpa

This is an example project, contains everything needed to use Spring Batch 3 to read from a database via JPA and write To a database via JPA. There is also tests.

There were the entries associated with the This project.

Blogsspring Batch–reading and Writing JPA

This was a simple Spring Batch project. This implementation would read from a database table and write to a database table via JPA.

http://javaninja.net/2016/02/spring-batch-reading-and-writing-jpa/

Spring Batch JPA Testing with transactions

This blog goes the testing options I is able to discover for Spring Batch with JPA.

http://javaninja.net/2016/02/spring-batch-jpa-testing-with-transactions/

Https://github.com/sheltonn/spring-batch-jpa

Spring Boot Spring Batch JPA PostGreSQL

Org.springframework.batch.item.database.JpaItemWriter

    /**      * Nothing special here a simple jpaitemwriter     @return     */    @Bean      Public itemwriter<person> writer () {        new Jpaitemwriter<person >();        Writer.setentitymanagerfactory (Entitymanagerfactory (). GetObject ());         return writer;    }

    /*** As data source we use an external database * *@return     */@Bean PublicDataSource DataSource () {Drivermanagerdatasource DataSource=NewDrivermanagerdatasource ();        Datasource.setdriverclassname (Databasedriver);        Datasource.seturl (Databaseurl);        Datasource.setusername (DatabaseUserName);        Datasource.setpassword (DatabasePassWord); returnDataSource; } @Bean PublicLocalcontainerentitymanagerfactorybean entitymanagerfactory () {Localcontainerentitymanagerfactorybean lef =NewLocalcontainerentitymanagerfactorybean (); Lef.setpackagestoscan ("Com.iqmsoft.spring.batch");        Lef.setdatasource (DataSource ());        Lef.setjpavendoradapter (Jpavendoradapter ()); Lef.setjpaproperties (NewProperties ()); returnLef; } @Bean PublicJpavendoradapter Jpavendoradapter () {hibernatejpavendoradapter jpavendoradapter=NewHibernatejpavendoradapter ();        Jpavendoradapter.setdatabase (Database.postgresql); JPAVENDORADAPTER.SETGENERATEDDL (true); Jpavendoradapter.setshowsql (false); Jpavendoradapter.setdatabaseplatform ("Org.hibernate.dialect.PostgreSQLDialect"); returnJpavendoradapter; }



Https://github.com/Murugar/SpringBootBatchJPA

Spring-boot-oracle Spring-batch

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.