SpringBoot creating UserDetailsService authentication with login and signup form example

There are plenty of online tutorials showing how to create database-based authentication for Spring. Some of them use SQL query to authenticate user and retrieve its roles, some use DAO… but none of them worked well for me and all of them had some major problems, even like SQL Injection. So, in this post I […]

Solution to SQLException: No suitable driver found for jdbc:mysql

Just a quick fix. Instead of: Connection con = null;   String url = "jdbc:mysql://localhost:3306/mysql"; String user = "user"; String password = "password"; con = DriverManager.getConnection(url, user, password);Connection con = null; String url = "jdbc:mysql://localhost:3306/mysql"; String user = "user"; String password = "password"; con = DriverManager.getConnection(url, user, password); You should have: Connection con = null; […]

No suitable driver found for jdbc:mysql

Miałem dzisiaj bardzo dziwny problem z NetBeans7.2 z próbą stworzenia połączenia z bazą danych MySQL. Zaczęło się od niedoczytanej dokumentacji… czyli zamiast: Connection con = null;   String url = "jdbc:mysql://localhost:3306/mysql"; String user = "user"; String password = "password"; con = DriverManager.getConnection(url, user, password); Connection con = null; String url = "jdbc:mysql://localhost:3306/mysql"; String user = […]