Technologies used:
1. Spring Boot 2.0.3.RELEASE
2. Maven 4
3. Java 9
4. Eclipse: Oxygen.1.a Release (4.7.1a)
5. Tomcat 9
6. MySql 5.7.24
Code on GitHub:
https://github.com/HenryXiloj/Spring-boot2-jndi-datasource-conexion
Steps:
1. Create table and insert on table.
CREATE TABLE `user` (
`id` bigint(20) NOT NULL,
`name` varchar(45) DEFAULT NULL,
`email` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `user` (`id`, `name`, `email`) VALUES ('1', 'Henry', 'test@gmail.com');
INSERT INTO `user` (`id`, `name`, `email`) VALUES ('2', 'Lucas', 'test2@gmail.com');
2. Add in your context.xml (path_your_tomcat9/conf/context.xml).
3. Import maven project from eclipse.
4. edit configuration file application.properties
https://github.com/HenryXiloj/Spring-boot2-jndi-datasource-conexion
Steps:
1. Create table and insert on table.
CREATE TABLE `user` (
`id` bigint(20) NOT NULL,
`name` varchar(45) DEFAULT NULL,
`email` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `user` (`id`, `name`, `email`) VALUES ('1', 'Henry', 'test@gmail.com');
INSERT INTO `user` (`id`, `name`, `email`) VALUES ('2', 'Lucas', 'test2@gmail.com');
2. Add in your context.xml (path_your_tomcat9/conf/context.xml).
3. Import maven project from eclipse.
4. edit configuration file application.properties
5. Run As -> Run on Server
No comments:
Post a Comment