otro cambio, no se que hize, help
This commit is contained in:
@@ -37,8 +37,15 @@ public class LoginController {
|
||||
String name = this.view.getUserField().getText();
|
||||
|
||||
Optional<Usuario> optionalUser = this.repository.getByName(name);
|
||||
if (optionalUser.isEmpty())
|
||||
if (optionalUser.isEmpty()) {
|
||||
JOptionPane.showMessageDialog(
|
||||
null,
|
||||
"El usuario o contraseña son incorrectos",
|
||||
"Error",
|
||||
JOptionPane.ERROR_MESSAGE
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
Usuario user = optionalUser.get();
|
||||
byte[] pass = Hash.sha256(new String(this.view.getPassField().getPassword()).getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<properties>
|
||||
<property name="javax.persistence.jdbc.driver" value="com.mysql.cj.jdbc.Driver"/>
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/biblioteca_manual"/>
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/biblioteca"/>
|
||||
<property name="javax.persistence.jdbc.user" value="root"/>
|
||||
<property name="javax.persistence.jdbc.password" value="ff9800s_a_d"/>
|
||||
<property name="hibernate.dialect" value="org.hibernate.dialect.MariaDB103Dialect"/>
|
||||
|
||||
Reference in New Issue
Block a user