Non riesco a capire perché la webapp "hello-springboot" del testo "Beginning Spring Boot 2" non salva i dati del DBMS ma riesce a leggerli.
Faccio una premessa, l'applicazione funziona alla perfezione e dovrebbe eseguire questa query:
delete from user;
insert into user(id, name) values(1,'John');
insert into user(id, name) values(2,'Smith');
insert into user(id, name) values(3,'Siva');
per poi stampare su una pagina HTML la tabella.
Se la webapp azzera il DBMS dopo aver renderizzato da dove me accorgo?
Per creare il DBMS ho fatto in questo modo:
CREAZIONE DBMS
CREATE DATABASE test;
USE test;
CREATE TABLE user (
id INT NOT NULL AUTO_INCREMENT,
name CHAR(30) NOT NULL,
PRIMARY KEY (id)
);
Leggo il DBMS da IntelliJ e sono quasi certo che funzioni e che la tabella user sia vuota.
Inoltre anche Mysql Workbench mi informa che la tabella user è vuota quindi sono certo che user sia vuota.
Sono sbigottito.
In Event Log leggo questo:
14/07/2020
17:43 All files are up-to-date
17:43 Application: Failed to retrieve application JMX service URL
17:43 Application: Failed to retrieve application JMX service URL
17:43 Application: Failed to retrieve application JMX service URL
17:43 Application: Failed to retrieve application JMX service URL
17:43 Application: Failed to retrieve application JMX service URL
17:43 Application: Failed to retrieve application JMX service URL
17:43 Application: Failed to retrieve application JMX service URL
17:43 Application: Failed to retrieve application JMX service URL
17:43 Application: Failed to retrieve application JMX service URL
17:43 Application: Failed to retrieve application JMX service URL
17:43 Application: Failed to retrieve application JMX service URL
17:43 Application: Failed to retrieve application JMX service URL
17:43 Application: Failed to retrieve application JMX service URL
17:43 Application: Failed to retrieve application JMX service URL
17:43 Application: Failed to retrieve application JMX service URL
17:43 Application: Failed to retrieve application JMX service URL
17:43 Application: Failed to retrieve application JMX service URL
17:43 Application: Failed to retrieve application JMX service URL
17:43 Application: Failed to retrieve application JMX service URL
17:43 Application: Failed to retrieve application JMX service URL
grazie come sempre