File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ useFull () {
4+ echo " Validate JPA Entities on startup"
5+ echo " spring.jpa.hibernate.ddl-auto=validate"
6+ echo " Generate and log statistics"
7+ echo " spring.jpa.properties.hibernate.generate_statistics=true"
8+ echo " logging.level.org.hibernate.stat=DEBUG"
9+ # Log slow queries
10+ echo " spring.jpa.properties.hibernate.session.events.log.LOG_QUERIES_SLOWER_THAN_MS=1"
11+ # Log all SQL statements
12+ echo " logging.level.org.hibernate.SQL=DEBUG"
13+ # Log cache operations
14+ echo " logging.level.org.hibernate.cache=DEBUG"
15+ }
16+
317enableLogging () {
418 echo " Root logger (global default logging level):"
519 echo " logging.level.root=warn"
@@ -54,9 +68,8 @@ mvnCleanEclipse(){
5468}
5569
5670startSpringBoot () {
57- echo " Which profile? (optional) "
71+ echo " Which profile?"
5872 read defprofiles
59- defprofiles=-Dspring-boot.run.profiles=${defprofiles}
6073 my_array=(" logging.level.web=DEBUG" \
6174 " logging.level.sql=DEBUG" \
6275 " logging.level.web=TRACE" \
@@ -65,7 +78,7 @@ startSpringBoot() {
6578 concatenated=$( printf " %s\n" " ${my_array[@]} " )
6679 selectItem ' printf "%s\n" "${my_array[@]}"' " awk '{print \$ 1}'"
6780 if [[ $fname == " " ]]; then return 0; fi
68- mvn spring-boot:run -Dspring-boot.run.arguments=--" $fname " ${defprofiles}
81+ executeCommand " SPRING_PROFILES_ACTIVE= " $defprofiles " mvn spring-boot:run -Dspring-boot.run.arguments=--" $fname " "
6982}
7083
7184showGlobalSettings (){
Original file line number Diff line number Diff line change @@ -24,5 +24,5 @@ menuInit "Super MAVEN Home"
2424 menuItem D " Clean deploy" " mvn clean deploy -DskipTests"
2525 submenuHead " Spring-Boot:"
2626 menuItemClm o " Start Spring Boot App" startSpringBoot r " Enable logging" enableLogging
27- menuItem s " View application properties" showProperties
27+ menuItemClm s " View application properties" showProperties v " Usefull notes " useFull
2828startMenu
You can’t perform that action at this time.
0 commit comments