No description, website, or topics provided.
Shell Batchfile Java
Switch branches/tags
Nothing to show
Clone or download
alejandro-du Merge pull request #1 from mstahv/master
Fix a bug in lazy loading implementation
Latest commit ef2cabc Apr 5, 2017
Permalink
Failed to load latest commit information.
.mvn/wrapper Initial commit Mar 8, 2017
src Fix a bug in lazy loading implementation Mar 30, 2017
.gitignore Initial commit Mar 8, 2017
README.md Create README.md Mar 15, 2017
mvnw Initial commit Mar 8, 2017
mvnw.cmd Initial commit Mar 8, 2017
pom.xml Fix a bug in lazy loading implementation Mar 30, 2017

README.md

lazy-loading-spring-demo

This is a Spring-based example application that demonstrates lazy loading with Vaadin Grid components.

Running the app

  1. Configure a database connection in the application.properties file. By default, this example uses a MySQL database. You should include the driver dependency in the pom.xml file if you want to use a diferent database.

  2. Create a person table:

CREATE TABLE person(
  id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
  first_name VARCHAR(255) NOT NULL,
  last_name VARCHAR(255) NOT NULL,
  email VARCHAR(255)
);
  1. Insert some test rows in the person table. If you are using MySQL, you can run the following script:
DELIMITER //
CREATE PROCEDURE insert_people(IN amount INT)
BEGIN
  DECLARE i INT DEFAULT 1;
  WHILE i <= amount DO
    INSERT INTO person(first_name,last_name,email)
      VALUES (CONCAT("First", i), CONCAT("Last", i), CONCAT("email", i, "@test.com"));
    SET i = i + 1;
  END WHILE;
END //

CALL insert_people(1000);
  1. Download, compile and run the app by running the following in a terminal:
git clone https://github.com/alejandro-du/lazy-loading-spring-demo.git
cd lazy-loading-spring-demo
mvn package spring-boot:run
  1. Point your browser to http://localhost:8080.