- Nestor Sokil
- Volodymyr Rogulya
- Vasyl Petryshak
- Dmytro Krupa
- Eduard Litvinchuck
- Taras Zyhmunt
- Demian Bekesh
LV-193.Java:
LV-211.Java:
- Vyacheslav Koldovskyy
- [Andriy Yurenya]
To run tests make sure test/java folder is highlighted with green color like on this pic: http://devcolibri.com/cp/wp-content/uploads/2013/03/junit-testing.png
To do so go to Project Structure -> Sources, select "test/java" and mark it as "test" folder. Run testcases by right-clicking on tab -> Run
use this link as a manual
pom.xml file is already configured!
on Runner tab set VM Options:
-Xms128m -Xmx8192m -XX:PermSize=128m -XX:MaxPermSize=256m
"Hello, it's kids room" page will be available on http://localhost:8080/home/
To start project you need to:
- Download MySql 5.7 on your computer.
- Create new database with command: "CREATE DATABASE database_name DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;".
- Create file "hibernate.properties" with appropriate code.
- Enter properties of your computer for that commands:
- Set "jdbc.url = jdbc:mysql://localhost:3306/database_name"
- Set jdbc.username = root (by default "root", check that name on your computer)
- Set jdbc.password = root (by default "root", check that name on your computer)
- Create Tomcat configuration:
- Edit Configuration
- Add New Configuration (Alt+Insert)
- Chose "Maven":
- Set Name: enter name new configuration (for example "Tomcat")
- Set Working directory: enter path to project folder (for example "D:/KidsRoom/lv-181java")
- Set Command line: enter command to run project "tomcat7:run"
- Now chose button "Ok"
- Run project.
- Now you can access to "http://localhost:8080/home/" and try project from local host. Good luck!
src/main/resources/properties/properties/hibernate.properties
:
jdbc.driverClassName = com.mysql.jdbc.Driver
jdbc.url = jdbc:mysql://localhost:3306/{database}
jdbc.username = {username}
jdbc.password = {password}
useUnicode = yes
characterEncoding = utf8
hibernate.dialect = org.hibernate.dialect.MySQLDialect
hibernate.show_sql = true
hibernate.format_sql = true
hibernate.hbm2ddl.auto = create
hibernate.enable_lazy_load_no_trans = true
hibernate.search.default.directory_provider = ram
hibernate.search.default.indexBase = com.acme.hibernate.CustomDirectoryProvider
hibernate.search.indexing_strategy = event
Login | Password |
---|---|
user@softserveinc.com | user |
admin@softserveinc.com | admin |
manager@softserveinc.com | manager |
For logging combination of SLF4J and Logback is used. Example of logging usage:
@Component
public class HelloLog {
// Get logger instance
private static @Log Logger LOG;
public void doSomething() {
try {
throw new Exception();
} catch (Exception e) {
LOG.error("Sample Exception", e);
}
}
}
Logger is configured to output to console and file in tomcat directory:
/CATALINA_HOME/logs/kids_room.log
. For more information consult
SLF4J Logger Interface