Skip to content
Snippets Groups Projects
Commit 8a04aee4 authored by Rhys Nute's avatar Rhys Nute
Browse files

database template

parent cf741af1
No related branches found
No related tags found
1 merge request!16Ready to merge - Database
......@@ -2,7 +2,10 @@ package Team5.SmartTowns.Data;
import java.util.List;
public interface UserRepository {
List<user> getAllUsers();
}
......@@ -29,7 +29,7 @@ public class UserRepositoryJDBC implements UserRepository{
@Override
public List<user> getAllUsers(){
String sql = "select * from user";
String sql = "select * from User";
return jdbc.query(sql, userMapper);
}
}
spring.datasource.url=jdbc:mariadb://localhost3306/Towns
spring.datasource.url=jdbc:mariadb://localhost:3306/towns
spring.datasource.username=root
spring.datasource.password=comsc
......
drop table if exists trails;
create table if not exists trails(
trailID bigint auto_increment primary key
) engine=InnoDB;
drop table if exists location;
create table if not exists location(
locationID bigint auto_increment primary key
) engine=InnoDB;
drop table if exists users;
create table if not exists users(
userID bigint auto_increment primary key
) engine=InnoDB;
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment