From eab4c609c2664cc2227785501493f65217948351 Mon Sep 17 00:00:00 2001 From: Oleg Pashkevych Date: Mon, 18 Dec 2017 18:32:18 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=D0=94=D0=BE=D0=B4=D0=B0=D0=B2=20spring-boo?= =?UTF-8?q?t-maven-plugin.=20=D0=A2=D0=B5=D0=BF=D0=B5=D1=80=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D0=B5=D0=BA=D1=82=20=D0=BC=D0=BE=D0=B6=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=BF=D1=83=D1=81=D0=BA=D0=B0=D1=82=D0=B8=20=D0=B7?= =?UTF-8?q?=20=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4=D0=BD=D0=BE=D0=B3=D0=BE?= =?UTF-8?q?=20=D1=80=D1=8F=D0=B4=D0=BA=D0=B0=20'mvn=20spring-boot:run'.=20?= =?UTF-8?q?=D0=92=D1=81=D1=96=20=D0=BF=D0=BE=D0=BB=D1=8F=20=D1=82=D0=B0?= =?UTF-8?q?=D0=B1=D0=BB=D0=B8=D1=86=D1=8C=20(models)=20=D0=B7=D1=80=D0=BE?= =?UTF-8?q?=D0=B1=D0=B8=D0=B2=20=D0=BE=D0=B1"=D1=94=D0=BA=D1=82=D0=B0?= =?UTF-8?q?=D0=BC=D0=B8.=20Id=20->=20Long.=20=20=20=D0=90=20=D1=82=D0=B0?= =?UTF-8?q?=D0=BA=D0=BE=D0=B6=20Name=20Convention,=20Code=20Convention,=20?= =?UTF-8?q?Case=20Sensitive=20Names.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 20 +++++- .../java/com/trello/ApplicationLauncher.java | 8 +-- .../configuration/SecurityConfiguration.java | 5 -- .../com/trello/controller/MainController.java | 58 ++++++++--------- .../java/com/trello/dao/BoardRepository.java | 2 +- .../java/com/trello/dao/UserRepository.java | 2 +- ...epository.java => UserRoleRepository.java} | 4 +- .../java/com/trello/mapper/UserMapper.java | 7 +-- src/main/java/com/trello/model/AppUser.java | 25 ++++---- src/main/java/com/trello/model/Board.java | 32 +++++----- src/main/java/com/trello/model/UserRole.java | 42 +++++++++++++ src/main/java/com/trello/model/User_role.java | 41 ------------ .../com/trello/service/AppUserService.java | 12 ++-- .../java/com/trello/service/BoardService.java | 2 +- .../service/UserDetailsServiseImpl.java | 31 +++++---- src/main/resources/application.properties | 5 +- src/main/resources/data.sql | 63 ++++++++++++------- 17 files changed, 188 insertions(+), 171 deletions(-) rename src/main/java/com/trello/dao/{User_roleRepository.java => UserRoleRepository.java} (56%) create mode 100644 src/main/java/com/trello/model/UserRole.java delete mode 100644 src/main/java/com/trello/model/User_role.java diff --git a/pom.xml b/pom.xml index 2c6d5a5..cc1f4f8 100644 --- a/pom.xml +++ b/pom.xml @@ -1,12 +1,10 @@ 4.0.0 - com.xTrello + com.trello Trello - war 1.0-SNAPSHOT Trello Maven Webapp - http://maven.apache.org UTF-8 @@ -70,6 +68,22 @@ ${project.encoding} + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.version} + + + + repackage + + + + + com.trello.ApplicationLauncher + + Trello diff --git a/src/main/java/com/trello/ApplicationLauncher.java b/src/main/java/com/trello/ApplicationLauncher.java index 06ebaf1..475481c 100644 --- a/src/main/java/com/trello/ApplicationLauncher.java +++ b/src/main/java/com/trello/ApplicationLauncher.java @@ -8,10 +8,10 @@ @SpringBootApplication public class ApplicationLauncher { - public static void main(String[] args){ - String password ="123"; - String encrytedPassword=encrytePassword(password); - System.out.println("Encryted Password "+encrytedPassword); + public static void main(String[] args) { + String password = "123"; + String encrytedPassword = encrytePassword(password); + System.out.println("Encrypted Password " + encrytedPassword); SpringApplication.run(ApplicationLauncher.class, args); } diff --git a/src/main/java/com/trello/configuration/SecurityConfiguration.java b/src/main/java/com/trello/configuration/SecurityConfiguration.java index 60e62bf..315bead 100644 --- a/src/main/java/com/trello/configuration/SecurityConfiguration.java +++ b/src/main/java/com/trello/configuration/SecurityConfiguration.java @@ -46,10 +46,5 @@ protected void configure(HttpSecurity config) throws Exception{ .and() .logout().logoutRequestMatcher(new AntPathRequestMatcher("/logout")) .logoutSuccessUrl("/").permitAll(); - } - - - - } diff --git a/src/main/java/com/trello/controller/MainController.java b/src/main/java/com/trello/controller/MainController.java index 6caa534..b09b0bd 100644 --- a/src/main/java/com/trello/controller/MainController.java +++ b/src/main/java/com/trello/controller/MainController.java @@ -34,69 +34,63 @@ public String getCurrentUsername() { } @RequestMapping(method = RequestMethod.GET) - public String mainPage(Model model){ - String username=getCurrentUsername(); - if (username=="anonymousUser"){ - model.addAttribute("check","anonim"); - model.addAttribute("message","hello"); - }else{ - model.addAttribute("check","userloginned"); - model.addAttribute("message","hello "+username); - } - + public String mainPage(Model model) { + String username = getCurrentUsername(); + if ("anonymousUser".equalsIgnoreCase(username)) { + model.addAttribute("check", "anonim"); + model.addAttribute("message", "hello"); + } else { + model.addAttribute("check", "userloginned"); + model.addAttribute("message", "hello " + username); + } model.addAttribute("board", boardService.getAll()); return "main"; } - @RequestMapping(value="/board") - public String boardPage(Model model,Principal principal) - { - User loginedUser = (User) ((Authentication)principal).getPrincipal(); + @RequestMapping(value = "/board") + public String boardPage(Model model, Principal principal) { + User loginedUser = (User) ((Authentication) principal).getPrincipal(); //TODO create board with creator_id - model.addAttribute("board",new Board()); + model.addAttribute("board", new Board()); return "board"; } - @RequestMapping(value="/board/view") - public String boardcontentPage(Model model,@RequestParam int id) - { + @RequestMapping(value = "/board/view") + public String boardcontentPage(Model model, @RequestParam Long id) { model.addAttribute("board", boardService.findOne(id)); return "boardcontent"; } - @RequestMapping(value = "/board/submit",method = RequestMethod.POST) - public String submitBoard(@ModelAttribute Board board){ + @RequestMapping(value = "/board/submit", method = RequestMethod.POST) + public String submitBoard(@ModelAttribute Board board) { boardService.save(board); return "redirect:/"; } @RequestMapping(value = "/reg") - public String reg(Model model){ + public String reg(Model model) { model.addAttribute("user", new AppUser()); return "reg"; } - @RequestMapping(value = "/reg/submit",method = RequestMethod.POST) - public String submitUser(Model model,@ModelAttribute AppUser user){ - String encrytedPassword=encrytePassword(user.getEncrytedPassword()); + @RequestMapping(value = "/reg/submit", method = RequestMethod.POST) + public String submitUser(Model model, @ModelAttribute AppUser user) { + String encrytedPassword = encrytePassword(user.getEncrytedPassword()); user.setEncrytedPassword(encrytedPassword); - short enable=1; + short enable = 1; user.setEnabled(enable); appUserService.save(user); - model.addAttribute("check","anonim"); - model.addAttribute("message","Registration succesful"); + model.addAttribute("check", "anonim"); + model.addAttribute("message", "Registration successful"); return "main"; } - - @RequestMapping(value="/login") - public String loginPage(){ + @RequestMapping(value = "/login") + public String loginPage() { return "login"; } - - } diff --git a/src/main/java/com/trello/dao/BoardRepository.java b/src/main/java/com/trello/dao/BoardRepository.java index 6528922..a94a378 100644 --- a/src/main/java/com/trello/dao/BoardRepository.java +++ b/src/main/java/com/trello/dao/BoardRepository.java @@ -5,5 +5,5 @@ import org.springframework.stereotype.Repository; @Repository -public interface BoardRepository extends CrudRepository{ +public interface BoardRepository extends CrudRepository{ } diff --git a/src/main/java/com/trello/dao/UserRepository.java b/src/main/java/com/trello/dao/UserRepository.java index 9761488..39fcc71 100644 --- a/src/main/java/com/trello/dao/UserRepository.java +++ b/src/main/java/com/trello/dao/UserRepository.java @@ -6,5 +6,5 @@ import org.springframework.stereotype.Repository; @Repository -public interface UserRepository extends CrudRepository { +public interface UserRepository extends CrudRepository { } diff --git a/src/main/java/com/trello/dao/User_roleRepository.java b/src/main/java/com/trello/dao/UserRoleRepository.java similarity index 56% rename from src/main/java/com/trello/dao/User_roleRepository.java rename to src/main/java/com/trello/dao/UserRoleRepository.java index fb7a016..bc4adbb 100644 --- a/src/main/java/com/trello/dao/User_roleRepository.java +++ b/src/main/java/com/trello/dao/UserRoleRepository.java @@ -1,10 +1,10 @@ package com.trello.dao; -import com.trello.model.User_role; +import com.trello.model.UserRole; import org.springframework.data.repository.CrudRepository; import org.springframework.stereotype.Repository; @Repository -public interface User_roleRepository extends CrudRepository { +public interface UserRoleRepository extends CrudRepository { } diff --git a/src/main/java/com/trello/mapper/UserMapper.java b/src/main/java/com/trello/mapper/UserMapper.java index c51a124..afac5a0 100644 --- a/src/main/java/com/trello/mapper/UserMapper.java +++ b/src/main/java/com/trello/mapper/UserMapper.java @@ -8,16 +8,15 @@ public class UserMapper implements RowMapper { - public static final String BASE_SQL// - ="Select u.User_Id, u.User_Name, u.Encryted_Password From App_User u "; + public static final String BASE_SQL = "Select u.User_Id, u.User_Name, u.Encrypted_Password From App_User u "; @Override public AppUser mapRow(ResultSet rs, int rowNum) throws SQLException{ Long userId = rs.getLong("User_Id"); String userName = rs.getString("User_Name"); - String encrytedPassword = rs.getString("Encryted_Password"); + String encryptedPassword = rs.getString("Encrypted_Password"); - return new AppUser(userId, userName, encrytedPassword); + return new AppUser(userId, userName, encryptedPassword); } } diff --git a/src/main/java/com/trello/model/AppUser.java b/src/main/java/com/trello/model/AppUser.java index 4f04f5a..ff62d25 100644 --- a/src/main/java/com/trello/model/AppUser.java +++ b/src/main/java/com/trello/model/AppUser.java @@ -3,18 +3,19 @@ import javax.persistence.*; @Entity -@Table(name = "app_user") +@Table(name = "App_User") public class AppUser { @Id @GeneratedValue + @Column(name = "User_Id") private Long userId; - @Column + @Column(name = "User_Name") private String userName; - @Column - private String encrytedPassword; - @Column - private short enabled; + @Column(name = "Encrypted_Password") + private String encryptedPassword; + @Column(name = "Enabled") + private Short enabled; public AppUser() { @@ -23,7 +24,7 @@ public AppUser() { public AppUser(Long userId, String userName, String encrytedPassword) { this.userId = userId; this.userName = userName; - this.encrytedPassword = encrytedPassword; + this.encryptedPassword = encrytedPassword; } public Long getUserId() { @@ -43,23 +44,23 @@ public void setUserName(String userName) { } public String getEncrytedPassword() { - return encrytedPassword; + return encryptedPassword; } public void setEncrytedPassword(String encrytedPassword) { - this.encrytedPassword = encrytedPassword; + this.encryptedPassword = encrytedPassword; } - public short getEnabled() { + public Short getEnabled() { return enabled; } - public void setEnabled(short enabled) { + public void setEnabled(Short enabled) { this.enabled = enabled; } @Override public String toString() { - return this.userName + "/" + this.encrytedPassword; + return this.userName + "/" + this.encryptedPassword; } } diff --git a/src/main/java/com/trello/model/Board.java b/src/main/java/com/trello/model/Board.java index 90a65ad..1cc3e10 100644 --- a/src/main/java/com/trello/model/Board.java +++ b/src/main/java/com/trello/model/Board.java @@ -1,32 +1,32 @@ package com.trello.model; import javax.persistence.*; -import java.io.Serializable; @Entity -@Table(name = "board") -public class Board implements Serializable, Comparable{ +@Table(name = "Board") +public class Board implements Comparable { @Id @GeneratedValue(strategy = GenerationType.AUTO) - private int id; - @Column + @Column(name = "Id") + private Long id; + @Column(name = "Name") private String name; - @Column - private int creator_id; - @Column - private long creatorTimestamp; + @Column(name = "Creator_Id") + private Long creatorId; + @Column(name = "Creator_Timestamp") + private Long creatorTimestamp; public Board() { - this.creatorTimestamp=System.currentTimeMillis(); + this.creatorTimestamp = System.currentTimeMillis(); } @Override - public int compareTo(Board that){ + public int compareTo(Board that) { return Long.compare(this.creatorTimestamp, that.creatorTimestamp); } - public long getId() { + public Long getId() { return id; } @@ -38,11 +38,11 @@ public void setName(String name) { this.name = name; } - public long getCreator_id() { - return creator_id; + public Long getCreatorId() { + return creatorId; } - public void setCreator_id(int creator_id) { - this.creator_id = creator_id; + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; } } diff --git a/src/main/java/com/trello/model/UserRole.java b/src/main/java/com/trello/model/UserRole.java new file mode 100644 index 0000000..c2ef679 --- /dev/null +++ b/src/main/java/com/trello/model/UserRole.java @@ -0,0 +1,42 @@ +package com.trello.model; + + +import javax.persistence.*; + +@Entity +@Table(name = "User_Role") +public class UserRole { + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + @Column(name="Id") + private Long id; + @Column(name="User_Id") + private Long userId; + @Column(name="Role_Id") + private Long roleId; + + public UserRole() { + } + + public UserRole(long userId, long roleId) { + this.userId = userId; + this.roleId = roleId; + } + + public long getUserId() { + return this.userId; + } + + public void setUserId(long userId) { + this.userId = userId; + } + + public long getRoleId() { + return this.roleId; + } + + public void setRoleId(long roleId) { + this.roleId = roleId; + } +} diff --git a/src/main/java/com/trello/model/User_role.java b/src/main/java/com/trello/model/User_role.java deleted file mode 100644 index f084308..0000000 --- a/src/main/java/com/trello/model/User_role.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.trello.model; - - -import javax.persistence.*; - -@Entity -@Table(name = "user_role") -public class User_role { - - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private long id; - @Column - private long User_Id; - @Column - private long Role_id; - - public User_role() { - } - - public User_role(long user_Id, long role_id) { - User_Id = user_Id; - Role_id = role_id; - } - - public long getUser_Id() { - return User_Id; - } - - public void setUser_Id(long user_Id) { - User_Id = user_Id; - } - - public long getRole_id() { - return Role_id; - } - - public void setRole_id(long role_id) { - Role_id = role_id; - } -} diff --git a/src/main/java/com/trello/service/AppUserService.java b/src/main/java/com/trello/service/AppUserService.java index 8d73b51..4f313de 100644 --- a/src/main/java/com/trello/service/AppUserService.java +++ b/src/main/java/com/trello/service/AppUserService.java @@ -2,9 +2,9 @@ import com.trello.dao.UserRepository; -import com.trello.dao.User_roleRepository; +import com.trello.dao.UserRoleRepository; import com.trello.model.AppUser; -import com.trello.model.User_role; +import com.trello.model.UserRole; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -18,13 +18,13 @@ public class AppUserService { @Autowired - private User_roleRepository user_roleRepository; + private UserRoleRepository user_roleRepository; public void save(AppUser user){ repository.save(user); - User_role user_role=new User_role(); - user_role.setUser_Id(user.getUserId()); - user_role.setRole_id(2); + UserRole user_role=new UserRole(); + user_role.setUserId(user.getUserId()); + user_role.setRoleId(2); user_roleRepository.save(user_role); } diff --git a/src/main/java/com/trello/service/BoardService.java b/src/main/java/com/trello/service/BoardService.java index ef07248..2e9d927 100644 --- a/src/main/java/com/trello/service/BoardService.java +++ b/src/main/java/com/trello/service/BoardService.java @@ -21,7 +21,7 @@ public void save(Board board){ repository.save(board); } - public Board findOne(int id ){Board board=repository.findOne(id); + public Board findOne(Long id){Board board=repository.findOne(id); return board; } public List getAll(){ diff --git a/src/main/java/com/trello/service/UserDetailsServiseImpl.java b/src/main/java/com/trello/service/UserDetailsServiseImpl.java index 98020f0..33ed68d 100644 --- a/src/main/java/com/trello/service/UserDetailsServiseImpl.java +++ b/src/main/java/com/trello/service/UserDetailsServiseImpl.java @@ -16,7 +16,7 @@ import java.util.List; @Service -public class UserDetailsServiseImpl implements UserDetailsService{ +public class UserDetailsServiseImpl implements UserDetailsService { @Autowired private UserDao userDao; @@ -25,30 +25,27 @@ public class UserDetailsServiseImpl implements UserDetailsService{ private RoleDao roleDao; @Override - public UserDetails loadUserByUsername(String userName) throws UsernameNotFoundException{ - AppUser appUser=this.userDao.findUserAccount(userName); + public UserDetails loadUserByUsername(String userName) throws UsernameNotFoundException { + AppUser appUser = this.userDao.findUserAccount(userName); - if(appUser==null){ - System.out.println("User not foubd!"+userName); - throw new UsernameNotFoundException("User"+userName+"was not found in database"); + if (appUser == null) { + System.out.println("User not found!" + userName); + throw new UsernameNotFoundException("User" + userName + "was not found in database"); } - System.out.println("Found User"+appUser); + System.out.println("Found User" + appUser); - List roleNames=this.roleDao.getRoleNames(appUser.getUserId()); + List roleNames = this.roleDao.getRoleNames(appUser.getUserId()); - ListgrantList=new ArrayList(); - if(roleNames!=null){ - for (String role: roleNames){ - GrantedAuthority authority=new SimpleGrantedAuthority(role); + List grantList = new ArrayList(); + if (roleNames != null) { + for (String role : roleNames) { + GrantedAuthority authority = new SimpleGrantedAuthority(role); grantList.add(authority); } } - UserDetails userDetails=(UserDetails) new User(appUser.getUserName(),// - appUser.getEncrytedPassword(),grantList); + UserDetails userDetails = (UserDetails) new User(appUser.getUserName(),// + appUser.getEncrytedPassword(), grantList); return userDetails; - - } - } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 7c701dd..f1ff026 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,8 +1,9 @@ server.port=8080 -# íàñòðîéêè äëÿ ðàáîòû ñ áàçîé äàííûõ +# ��������� ��� ������ � ����� ������ spring.datasource.url=jdbc:mysql://localhost/trello spring.datasource.username=root spring.datasource.password= #spring.datasource.data=data.sql spring.jpa.hibernate.ddl-auto=update -spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect +#spring.jpa.database-platform=org.hibernate.dialect.MySQL5Dialect +#spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql index 045d4fd..ac88cfb 100644 --- a/src/main/resources/data.sql +++ b/src/main/resources/data.sql @@ -1,74 +1,89 @@ +DROP DATABASE IF EXISTS trello; +create DATABASE trello CHARACTER SET utf8; +use trello; -- Create table -DROP TABLE IF EXISTS APP_USER; -create table APP_USER +DROP TABLE IF EXISTS App_User; +create table App_User ( - user_id BIGINT not null AUTO_INCREMENT PRIMARY KEY , - User_Name VARCHAR(36) not null, - Encryted_Password VARCHAR(128) not null, - Enabled BIT not null + User_Id BIGINT not null AUTO_INCREMENT PRIMARY KEY , + User_Name VARCHAR(36) not null, + Encrypted_Password VARCHAR(128) not null, + Enabled BIT not null ) ; -alter table APP_USER +alter table App_User add constraint APP_USER_UK unique (User_Name); -- Create table -DROP TABLE IF EXISTS APP_ROLE; -create table APP_ROLE +DROP TABLE IF EXISTS App_Role; +create table App_Role ( Role_Id BIGINT not null AUTO_INCREMENT PRIMARY KEY , Role_Name VARCHAR(30) not null ) ; -alter table APP_ROLE +alter table App_Role add constraint APP_ROLE_UK unique (Role_Name); -- Create table -DROP TABLE IF EXISTS USER_ROLE; -create table USER_ROLE +DROP TABLE IF EXISTS User_Role; +create table User_Role ( Id BIGINT not null AUTO_INCREMENT PRIMARY KEY , User_Id BIGINT not null, Role_Id BIGINT not null ); -alter table USER_ROLE +alter table User_Role add constraint USER_ROLE_UK unique (User_Id, Role_Id); -alter table USER_ROLE +alter table User_Role add constraint USER_ROLE_FK1 foreign key (User_Id) -references APP_USER (User_Id); +references App_User (User_Id); -alter table USER_ROLE +alter table User_Role add constraint USER_ROLE_FK2 foreign key (Role_Id) -references APP_ROLE (Role_Id); +references App_Role (Role_Id); +DROP TABLE IF EXISTS Board; +create table Board +( + Id BIGINT not null AUTO_INCREMENT PRIMARY KEY , + Name VARCHAR(36) not null, + Creator_Id BIGINT, + Creator_Timestamp BIGINT not null + +); +alter table Board + add constraint CREATOR_FK foreign key (Creator_Id) +references App_User (User_Id); -insert into App_User ( User_Name, Encryted_Password, Enabled) +insert into App_User ( User_Name, Encrypted_Password, Enabled) values ( 'dbuser1', '$2a$10$PrI5Gk9L.tSZiW9FXhTS8O8Mz9E97k2FZbFvGFFaSsiTUIl.TCrFu', 1); -insert into App_User (User_Name, Encryted_Password, Enabled) +insert into App_User (User_Name, Encrypted_Password, Enabled) values ( 'dbadmin1', '$2a$10$PrI5Gk9L.tSZiW9FXhTS8O8Mz9E97k2FZbFvGFFaSsiTUIl.TCrFu', 1); -insert into app_role ( Role_Name) +insert into App_Role ( Role_Name) values ( 'ROLE_ADMIN'); -insert into app_role ( Role_Name) +insert into App_Role ( Role_Name) values ( 'ROLE_USER'); -insert into user_role ( User_id, Role_Id) +insert into User_Role ( User_id, Role_Id) values ( 1, 1); -insert into user_role ( User_id, Role_Id) +insert into User_Role ( User_id, Role_Id) values ( 1, 2); -insert into user_role ( User_id, Role_Id) +insert into User_Role ( User_id, Role_Id) values ( 2, 2); From 3e2d411614b5a934385ced504a9ad63e15d2abe8 Mon Sep 17 00:00:00 2001 From: Oleg Pashkevych Date: Mon, 18 Dec 2017 18:34:31 +0200 Subject: [PATCH 2/2] Case Sensitive Entities Names in Hibernate mappings are fixed. --- src/main/resources/application.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index f1ff026..43479b6 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -2,8 +2,8 @@ server.port=8080 # ��������� ��� ������ � ����� ������ spring.datasource.url=jdbc:mysql://localhost/trello spring.datasource.username=root -spring.datasource.password= +spring.datasource.password=root #spring.datasource.data=data.sql spring.jpa.hibernate.ddl-auto=update -#spring.jpa.database-platform=org.hibernate.dialect.MySQL5Dialect -#spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl +spring.jpa.database-platform=org.hibernate.dialect.MySQL5Dialect +spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl