Skip to content

sanogotech/myjavajeespringboot

Repository files navigation

Sample Code

Maven Cycle

when you run a Maven goal, it will run any previous goal. The order of basic phases is:

- Validate
- Compile
- Test
- Package
- Verify
- Install
- Deploy

Based on official documentation:

TEST - test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed

VERIFY - run any checks on results of integration tests to ensure quality criteria are met

To run unit tests, the Surefire plugin is recommended. And Failsafe for integration tests.

Bootstrap Theme

JPA One to Many

https://www.baeldung.com/hibernate-one-to-many

  • Spring Data JPA find by embedded object property -- Booking|User
List<Booking> findByUser_username(String username);

https://www.logicbig.com/tutorials/spring-framework/spring-data/nested-properties-resolution.html

List<Employee> findByDeptartementName(String deptName);

List<Employee> findByDeptartement_name(String deptName);

JPA One Many + REST API

https://netsurfingzone.com/hibernate/one-to-many-mapping-annotation-example-in-hibernate-jpa-using-spring-boot-and-oracle/

Spring DATA JPA FindBy---

Javadoc Command

C:\b2b\com\steve\util
C:\b2b\com\steve\app
C:\b2b\com\steve\gui\

  • javadoc -d "C:\docs" -sourcepath "C:\b2b" -subpackages com

  • javadoc -d "C:\projectjee\projetdegestionsdestocks\docs\MyJavaDocs" -sourcepath "C:\projectjee\projetdegestionsdestocks\src\main\java" -subpackages comjavadoc -d "C:\projectjee\projetdegestionsdestocks\docs\MyJavaDocs" -sourcepath "C:\projectjee\projetdegestionsdestocks\src\main\java" -subpackages com

*** Test en Mode DEV

  1. mvn spring-boot:run

  2. http://localhost:8088

user/pwd : [email protected] / admin2017

  1. http://localhost:8088/h2web

url : jdbc:h2:mem:contactmanager user: sa pwd:

Pour voir la base en mémoire.

** Spring DATA REST

---- HIBERNATE Performance Tips Sample: *https://dzone.com/articles/50-best-performance-practices-for-hibernate-5-amp