Java - Problema de ejecución Spring Boot

 
Vista:
sin imagen de perfil
Val: 4
Ha aumentado su posición en 7 puestos en Java (en relación al último mes)
Gráfica de Java

Problema de ejecución Spring Boot

Publicado por Mauricio (2 intervenciones) el 21/04/2021 21:41:48
El siguiente programa "carga" (no sé como más decirlo) una tabla de Workbench en Netbeans...siendo exitosa la conexión ya que en el compilador se puede hacer la lectura (manual) de la tabla. Anexo pantallazo de la tabla de Workbench en Netbeans:


ayuda1
(Esta tabla es de dos personas con su nombre, apellido, email y telefono.

El programa cuenta con 4 paquetes y cada uno con un archivo, está el inicializador, la clase o el bean dominante, la interface que extiende a las operaciones CRUD, el controlador y el index. En su orden:

Inicializador:


ayuda2
(Encargada de la ejecución, salta al controlador)

Controlador:

ayuda3
Expone un log.info en el servidor (El cual no se muestra, entiendo que aquí ya hay un problema de ejecución
Después inserta en la variable personas el resultado del método findAll() sobre el objeto personaDao de la clase PersonaDAO.

Interface PersonaDAO:

ayuda5

Extiende a CrudRepository y alcanza los métodos básicos Crud (En este caso se utiliza findAll() como método requerido para mostrar toda la tabla.


Bean Persona:
ayuda4

Relacionada con la base de datos a través de la anotación @Entity (creo estar en lo correcto), con @Data inserto getter y setter y con @Table... evito conflictos de mayúsculas y minúsculas entre la aplicación y la BDD.

A continuación el archivo application.properties:

ayuda7

Y finalmente el pom.xml con las dependencias, eliminé

1
2
3
4
5
6
<dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.10</version>
            <scope>provided</scope>
        </dependency>

Ya que en el clean and build arrojaba una alerta de redundancia. Aquí está:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.4.4</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.holaS.gm</groupId>
    <artifactId>HolaSpringDataCheck</artifactId>
    <version>1.0</version>
    <name>Hello_Spring_Data_check</name>
    <description>Hello Word Spring Boot</description>
    <properties>
        <java.version>13</java.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
 
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>5.3.5</version>
            <type>jar</type>
        </dependency>
 
    </dependencies>
 
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                        </exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>
 
</project>


El archivo index tiene el siguiente código:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<html xmlns:th="http://www.thymeleaf.org" >
    <head>
        <title>Inicio</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <body>
        <div>Inicio</div>
 
 
        <br/>
 
        <div th:if="${personas != null and !personas.empty}">
            <table border="1"><tr>
                    <th>
                        Nombre
                    </th>
                    <th>
                        Apellido
                    </th>
                    <th>
                        Email
                    </th>
                    <th>
                        Telefono
                    </th>
                </tr>
 
                <tr th:each="persona: ${personas}">
                    <td th:text="${persona.nombre}">Mostrar nombre</td>
                    <td th:text="${persona.apellido}">Mostrar apellido</td>
                    <td th:text="${persona.email}">Mostrar email</td>
                    <td th:text="${persona.telefono}">Mostrar telefono</td>
                </tr>
        </div>
 
    </table>
 
            <div th:if="${personas == null or personas.empty}">
                La lista de personas está vacia
            </div>
 
 
 
</body>
</html>

Y por supuesto como no realiza ningún procedimiento interno paso a paso, el resultado en el navegador es "La lista de personas está vacía"

El resultado de compilación es aparentemente normal, no muestra ningún error. Tenía una particularidad con lombok y es que si ejecuto desde consola el .jar, me muestra una ventana gráfica donde aparecía seleccionado "Eclipse", como estoy desesperado borré ese compilador y creo que no hay que hacer nada especial entre lombok-netbeans, puesto que nisiquiera en esta librería al ejecutarla me permite añadir Netbeans...entiendo como si ese proceso es exclusivo con Eclipse.

Dejo también el Clean and build por si ven algo importante:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
cd C:\USpring\leccion03\Hello_Spring_Data_Check; "JAVA_HOME=C:\\Program Files\\Java\
\jdk-13.0.2" cmd /c "\"C:\\Program Files\\NetBeans-12.2\\netbeans\\java\\maven\\bin\
\mvn.cmd\" -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans-12.2\\netbeans\\java\
\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 clean install"
Scanning for projects...
 
------------------< com.holaS.gm:HolaSpringDataCheck >------------------
Building Hello_Spring_Data_check 1.0
--------------------------------[ jar ]---------------------------------
 
--- maven-clean-plugin:3.1.0:clean (default-clean) @ HolaSpringDataCheck ---
Deleting C:\USpring\leccion03\Hello_Spring_Data_Check\target
 
--- maven-resources-plugin:3.2.0:resources (default-resources) @ HolaSpringDataCheck
 
---
Using 'UTF-8' encoding to copy filtered resources.
Using 'UTF-8' encoding to copy filtered properties files.
Copying 1 resource
Copying 1 resource
 
--- maven-compiler-plugin:3.8.1:compile (default-compile) @ HolaSpringDataCheck ---
Changes detected - recompiling the module!
Compiling 4 source files to C:\USpring\leccion03\Hello_Spring_Data_Check\target
 
\classes
 
--- maven-resources-plugin:3.2.0:testResources (default-testResources) @
 
HolaSpringDataCheck ---
Using 'UTF-8' encoding to copy filtered resources.
Using 'UTF-8' encoding to copy filtered properties files.
skip non existing resourceDirectory C:\USpring\leccion03\Hello_Spring_Data_Check\src
 
\test\resources
 
--- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @
 
HolaSpringDataCheck ---
Changes detected - recompiling the module!
Compiling 1 source file to C:\USpring\leccion03\Hello_Spring_Data_Check\target\test-
 
classes
 
--- maven-surefire-plugin:2.22.2:test (default-test) @ HolaSpringDataCheck ---
file.encoding cannot be set as system property, use <argLine>-
 
Dfile.encoding=...</argLine> instead
 
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.holaS.gm.HelloSpringApplicationTests
14:30:56.417 [main] DEBUG org.springframework.test.context.BootstrapUtils -
 
Instantiating CacheAwareContextLoaderDelegate from class
 
[org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate]
14:30:56.441 [main] DEBUG org.springframework.test.context.BootstrapUtils -
 
Instantiating BootstrapContext using constructor [public
 
org.springframework.test.context.support.DefaultBootstrapContext
 
(java.lang.Class,org.springframework.test.context.CacheAwareContextLoaderDelegate)]
14:30:56.498 [main] DEBUG org.springframework.test.context.BootstrapUtils -
 
Instantiating TestContextBootstrapper for test class
 
[com.holaS.gm.HelloSpringApplicationTests] from class
 
[org.springframework.boot.test.context.SpringBootTestContextBootstrapper]
14:30:56.517 [main] INFO
 
org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Neither
 
@ContextConfiguration nor @ContextHierarchy found for test class
 
[com.holaS.gm.HelloSpringApplicationTests], using SpringBootContextLoader
14:30:56.523 [main] DEBUG
 
org.springframework.test.context.support.AbstractContextLoader - Did not detect
 
default resource location for test class [com.holaS.gm.HelloSpringApplicationTests]:
 
class path resource [com/holaS/gm/HelloSpringApplicationTests-context.xml] does not
 
exist
14:30:56.524 [main] DEBUG
 
org.springframework.test.context.support.AbstractContextLoader - Did not detect
 
default resource location for test class [com.holaS.gm.HelloSpringApplicationTests]:
 
class path resource [com/holaS/gm/HelloSpringApplicationTestsContext.groovy] does not
 
exist
14:30:56.525 [main] INFO
 
org.springframework.test.context.support.AbstractContextLoader - Could not detect
 
default resource locations for test class [com.holaS.gm.HelloSpringApplicationTests]:
 
no resource found for suffixes {-context.xml, Context.groovy}.
14:30:56.526 [main] INFO
 
org.springframework.test.context.support.AnnotationConfigContextLoaderUtils - Could
 
not detect default configuration classes for test class
 
[com.holaS.gm.HelloSpringApplicationTests]: HelloSpringApplicationTests does not
 
declare any static, non-private, non-final, nested classes annotated with
 
@Configuration.
14:30:56.621 [main] DEBUG org.springframework.test.context.support.ActiveProfilesUtils
 
- Could not find an 'annotation declaring class' for annotation type
 
[org.springframework.test.context.ActiveProfiles] and class
 
[com.holaS.gm.HelloSpringApplicationTests]
14:30:56.744 [main] DEBUG
 
org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider -
 
Identified candidate component class: file [C:\USpring
 
\leccion03\Hello_Spring_Data_Check\target\classes\com\holaS\gm
 
\HelloSpringApplication.class]
14:30:56.746 [main] INFO
 
org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Found
 
@SpringBootConfiguration com.holaS.gm.HelloSpringApplication for test class
 
com.holaS.gm.HelloSpringApplicationTests
14:30:56.917 [main] DEBUG
 
org.springframework.boot.test.context.SpringBootTestContextBootstrapper -
 
@TestExecutionListeners is not present for class
 
[com.holaS.gm.HelloSpringApplicationTests]: using defaults.
14:30:56.918 [main] INFO
 
org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Loaded
 
default TestExecutionListener class names from location [META-INF/spring.factories]:
 
[org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener,
 
org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener,
 
org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener,
 
org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestE
 
xecutionListener,
 
org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestE
 
xecutionListener,
 
org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener
 
,
 
org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTes
 
tExecutionListener, org.springframework.test.context.web.ServletTestExecutionListener,
 
org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListene
 
r, org.springframework.test.context.event.ApplicationEventsTestExecutionListener,
 
org.springframework.test.context.support.DependencyInjectionTestExecutionListener,
 
org.springframework.test.context.support.DirtiesContextTestExecutionListener,
 
org.springframework.test.context.transaction.TransactionalTestExecutionListener,
 
org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener,
 
org.springframework.test.context.event.EventPublishingTestExecutionListener]
14:30:56.947 [main] INFO
 
org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using
 
TestExecutionListeners:
 
[org.springframework.test.context.web.ServletTestExecutionListener@d771cc9,
 
org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListene
 
r@36b4091c,
 
org.springframework.test.context.event.ApplicationEventsTestExecutionListener@4671115f
 
, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@36cda2c2,
 
org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecution
 
Listener@3697186,
 
org.springframework.test.context.support.DirtiesContextTestExecutionListener@1583741e,
 
org.springframework.test.context.transaction.TransactionalTestExecutionListener@5b3674
 
18, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@36060e,
 
org.springframework.test.context.event.EventPublishingTestExecutionListener@481ba2cf,
 
org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@46b61c56,
 
org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@2e4
 
8362c,
 
org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestE
 
xecutionListener@1efe439d,
 
org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestE
 
xecutionListener@be68757,
 
org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener
 
@7d446ed1,
 
org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTes
 
tExecutionListener@12d2ce03]
14:30:56.955 [main] DEBUG
 
org.springframework.test.context.support.AbstractDirtiesContextTestExecutionListener -
 
Before test class: context [DefaultTestContext@479460a6 testClass =
 
HelloSpringApplicationTests, testInstance = [null], testMethod = [null], testException
 
= [null], mergedContextConfiguration = [WebMergedContextConfiguration@7164ca4c
 
testClass = HelloSpringApplicationTests, locations = '{}', classes = '{class
com.holaS.gm.HelloSpringApplication}', contextInitializerClasses = '[]',
activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties =
'{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}',
 
contextCustomizers = set
 
[org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@48974e45,
 
org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory
 
$DuplicateJsonObjectContextCustomizer@50ad3bc1,
 
org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0,
 
org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@ea6147e,
 
org.springframework.boot.test.autoconfigure.actuate.metrics.MetricsExportContextCustom
 
izerFactory$DisableMetricExportContextCustomizer@6f46426d,
 
org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomize
 
r@0,
 
org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFact
 
ory$Customizer@383bfa16, org.springframework.boot.test.context.SpringBootTestArgs@1,
 
org.springframework.boot.test.context.SpringBootTestWebEnvironment@2c039ac6],
 
resourceBasePath = 'src/main/webapp', contextLoader =
 
'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]],
 
attributes = map
 
['org.springframework.test.context.web.ServletTestExecutionListener.activateListener'
 
-> true]], class annotated with @DirtiesContext [false] with mode [null].
14:30:57.024 [main] DEBUG
 
org.springframework.test.context.support.TestPropertySourceUtils - Adding inlined
 
properties to environment: {spring.jmx.enabled=false,
 
org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}
02:30  INFO 9980 --- [           main] c.holaS.gm.HelloSpringApplicationTests   :
 
Starting HelloSpringApplicationTests using Java 13.0.2 on Mconto with PID 9980
 
(started by Mauricio in C:\USpring\leccion03\Hello_Spring_Data_Check)
02:30  INFO 9980 --- [           main] c.holaS.gm.HelloSpringApplicationTests   : No
 
active profile set, falling back to default profiles: default
02:30  INFO 9980 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate :
 
Bootstrapping Spring Data JPA repositories in DEFAULT mode.
02:30  INFO 9980 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate :
 
Finished Spring Data repository scanning in 9 ms. Found 0 JPA repository interfaces.
02:31  INFO 9980 --- [           main] com.zaxxer.hikari.HikariDataSource       :
 
HikariPool-1 - Starting...
02:31  INFO 9980 --- [           main] com.zaxxer.hikari.HikariDataSource       :
 
HikariPool-1 - Start completed.
02:31  INFO 9980 --- [           main] o.hibernate.jpa.internal.util.LogHelper  :
 
HHH000204: Processing PersistenceUnitInfo [name: default]
02:31  INFO 9980 --- [           main] org.hibernate.Version                    :
 
HHH000412: Hibernate ORM core version 5.4.29.Final
02:31  INFO 9980 --- [           main] o.hibernate.annotations.common.Version   :
 
HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
02:31  INFO 9980 --- [           main] org.hibernate.dialect.Dialect            :
 
HHH000400: Using dialect: org.hibernate.dialect.MySQL8Dialect
02:31  INFO 9980 --- [           main] o.h.e.t.j.p.i.JtaPlatformInitiator       :
 
HHH000490: Using JtaPlatform implementation:
 
[org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
02:31  INFO 9980 --- [           main] j.LocalContainerEntityManagerFactoryBean :
 
Initialized JPA EntityManagerFactory for persistence unit 'default'
02:31  WARN 9980 --- [           main] JpaBaseConfiguration$JpaWebConfiguration :
 
spring.jpa.open-in-view is enabled by default. Therefore, database queries may be
 
performed during view rendering. Explicitly configure spring.jpa.open-in-view to
 
disable this warning
02:31  INFO 9980 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  :
 
Initializing ExecutorService 'applicationTaskExecutor'
02:31  INFO 9980 --- [           main] o.s.b.a.w.s.WelcomePageHandlerMapping    :
 
Adding welcome page template: index
02:31  INFO 9980 --- [           main] c.holaS.gm.HelloSpringApplicationTests   :
 
Started HelloSpringApplicationTests in 7.667 seconds (JVM running for 9.479)
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.1 s - in
 
com.holaS.gm.HelloSpringApplicationTests
02:31  INFO 9980 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor  :
 
Shutting down ExecutorService 'applicationTaskExecutor'
02:31  INFO 9980 --- [extShutdownHook] j.LocalContainerEntityManagerFactoryBean :
 
Closing JPA EntityManagerFactory for persistence unit 'default'
02:31  INFO 9980 --- [extShutdownHook] com.zaxxer.hikari.HikariDataSource       :
 
HikariPool-1 - Shutdown initiated...
02:31  INFO 9980 --- [extShutdownHook] com.zaxxer.hikari.HikariDataSource       :
 
HikariPool-1 - Shutdown completed.
 
Results:
 
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
 
 
--- maven-jar-plugin:3.2.0:jar (default-jar) @ HolaSpringDataCheck ---
Building jar: C:\USpring\leccion03\Hello_Spring_Data_Check\target
 
\HolaSpringDataCheck-1.0.jar
 
--- spring-boot-maven-plugin:2.4.4:repackage (repackage) @ HolaSpringDataCheck ---
Replacing main artifact with repackaged archive
 
--- maven-install-plugin:2.5.2:install (default-install) @ HolaSpringDataCheck ---
Installing C:\USpring\leccion03\Hello_Spring_Data_Check\target\HolaSpringDataCheck-
 
1.0.jar to C:\Users\Mauricio\.m2\repository\com\holaS\gm\HolaSpringDataCheck
 
\1.0\HolaSpringDataCheck-1.0.jar
Installing C:\USpring\leccion03\Hello_Spring_Data_Check\pom.xml to C:\Users\Mauricio
 
\.m2\repository\com\holaS\gm\HolaSpringDataCheck\1.0\HolaSpringDataCheck-1.0.pom
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time:  23.044 s
Finished at: 2021-04-21T14:31:08-05:00
------------------------------------------------------------------------

Finalmente el output una vez doy Run al proyecto:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
cd C:\USpring\leccion03\Hello_Spring_Data_Check; SPRING_OUTPUT_ANSI_ENABLED=always "JAVA_HOME=C:\\Program Files\\Java\\jdk-13.0.2" cmd /c "\"C:\\Program Files\\NetBeans-12.2\\netbeans\\java\\maven\\bin\\mvn.cmd\" -Dspring-boot.run.jvmArguments=\"-noverify -XX:TieredStopAtLevel=1\" -Dspring-boot.run.mainClass=com.holaS.gm.HelloSpringApplication -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans-12.2\\netbeans\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 spring-boot:run"
Running NetBeans Compile On Save execution. Phase execution is skipped and output directories of dependency projects (with Compile on Save turned on) will be used instead of their jar artifacts.
Scanning for projects...
 
------------------< com.holaS.gm:HolaSpringDataCheck >------------------
Building Hello_Spring_Data_check 1.0
--------------------------------[ jar ]---------------------------------
 
>>> spring-boot-maven-plugin:2.4.4:run (default-cli) > test-compile @ HolaSpringDataCheck >>>
 
--- maven-resources-plugin:3.2.0:resources (default-resources) @ HolaSpringDataCheck ---
Using 'UTF-8' encoding to copy filtered resources.
Using 'UTF-8' encoding to copy filtered properties files.
Copying 1 resource
Copying 1 resource
 
--- maven-compiler-plugin:3.8.1:compile (default-compile) @ HolaSpringDataCheck ---
Nothing to compile - all classes are up to date
 
--- maven-resources-plugin:3.2.0:testResources (default-testResources) @ HolaSpringDataCheck ---
Using 'UTF-8' encoding to copy filtered resources.
Using 'UTF-8' encoding to copy filtered properties files.
skip non existing resourceDirectory C:\USpring\leccion03\Hello_Spring_Data_Check\src\test\resources
 
--- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ HolaSpringDataCheck ---
Nothing to compile - all classes are up to date
 
<<< spring-boot-maven-plugin:2.4.4:run (default-cli) < test-compile @ HolaSpringDataCheck <<<
 
 
--- spring-boot-maven-plugin:2.4.4:run (default-cli) @ HolaSpringDataCheck ---
Attaching agents: []
Java HotSpot(TM) 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
02:33  INFO 9128 --- [  restartedMain] com.holaS.gm.HelloSpringApplication      : Starting HelloSpringApplication using Java 13.0.2 on Mconto with PID 9128 (C:\USpring\leccion03\Hello_Spring_Data_Check\target\classes started by Mauricio in C:\USpring\leccion03\Hello_Spring_Data_Check)
02:33  INFO 9128 --- [  restartedMain] com.holaS.gm.HelloSpringApplication      : No active profile set, falling back to default profiles: default
02:33  INFO 9128 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
02:33  INFO 9128 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
02:33  INFO 9128 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
02:33  INFO 9128 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 11 ms. Found 0 JPA repository interfaces.
02:33  INFO 9128 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
02:33  INFO 9128 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
02:33  INFO 9128 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.44]
02:33  INFO 9128 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
02:33  INFO 9128 --- [  restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2083 ms
02:33  INFO 9128 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
02:33  INFO 9128 --- [  restartedMain] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
02:33  INFO 9128 --- [  restartedMain] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [name: default]
02:33  INFO 9128 --- [  restartedMain] org.hibernate.Version                    : HHH000412: Hibernate ORM core version 5.4.29.Final
02:33  INFO 9128 --- [  restartedMain] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
02:33  INFO 9128 --- [  restartedMain] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MySQL8Dialect
02:33  INFO 9128 --- [  restartedMain] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
02:33  INFO 9128 --- [  restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
02:33  WARN 9128 --- [  restartedMain] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
02:33  INFO 9128 --- [  restartedMain] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
02:33  INFO 9128 --- [  restartedMain] o.s.b.a.w.s.WelcomePageHandlerMapping    : Adding welcome page template: index
02:33  INFO 9128 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
02:33  INFO 9128 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
02:33  INFO 9128 --- [  restartedMain] com.holaS.gm.HelloSpringApplication      : Started HelloSpringApplication in 4.591 seconds (JVM running for 5.198)

En este último se ve que el log.info no se ejecuta

Cómo pregunta adicional, menos importante:

Cada vez que hago Run en el proyecto, necesito desde el simbolo del sistema buscar los procesos que se ejecutan en el puerto 8080 y después hacer un taskkill, es incomodo, si alguien puede darme una mano con lo que me está sucediendo, la verdad estoy infinitamente agradecido...
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de Omar
Val: 77
Ha disminuido su posición en 8 puestos en Java (en relación al último mes)
Gráfica de Java

Problema de ejecución Spring Boot

Publicado por Omar (24 intervenciones) el 28/04/2021 08:30:58
Aparentemente todo se ve bien, solo que no muestra el log por que aún no entras a tu aplicación, dale run al proyecto y luego entra a

http://localhost:8080/ o http://localhost:8080/Hello_Spring_Data_Check\

Y por último verifica que tengas el log info.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar