JAVA, Spring MVC, Spring Boot, JPA
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.
https://www.baeldung.com/hibernate-one-to-many
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);
https://www.baeldung.com/spring-data-derived-queries
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
mvn spring-boot:run
user/pwd : admin@test.com / admin2017
url : jdbcmem:contactmanager
user: sa
pwd:
Pour voir la base en mémoire.
** Spring DATA REST
Add spring data rest starter with spring data : pom.xml
Implemente Default @Repository with findby?
ADD spring.data.rest.basePath=/api to application.properties
http://localhost:8088/api/ (display all Rest Urls)
First page=0
User findByEmail(String email) in repository —-> /api/search —> myemail@yahoo.fr"">http://localhost:8088/api/users/search/findByEmail?email=myemail@yahoo.fr
Exemple Url with pagination and sort on attribute: http://localhost:8088/api/users?page=0&size=5&sort=name,desc
—— HIBERNATE Performance Tips Sample:
*https://dzone.com/articles/50-best-performance-practices-for-hibernate-5-amp