Skip to content

Commit ab30e23

Browse files
authored
Merge pull request #86 from Zifah/master
Make it seamless to start up the website in development mode
2 parents 745769f + 440c821 commit ab30e23

File tree

2 files changed

+75
-2
lines changed

2 files changed

+75
-2
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,14 @@ the core application.
9999
100100
#### Via an IDE
101101
102-
If you use an IDE like Intellij, you can run the application by running the `public static void main` in DictionaryApplication class
102+
If you use an IDE like Intellij, you can run the application by running the `public static void main`
103+
in DictionaryApplication class; you just need to make sure in the VM options, you pass
104+
`-Dspring.profiles.active=development` as the value
103105
104106
#### Via Spring Boot Run Plugin
105107
106108
1. cd into the projects parent directory and run `mvn clean install`. This would download all the project's dependencies, build the project and install it locally into the maven repository
107-
2. cd into the website module ({parent_directory}/website) and run `mvn spring-boot:run`
109+
2. cd into the website module ({parent_directory}/website) and run `mvn spring-boot:run -Dspring.profiles.active=development`
108110
109111
The application would start up and can be accessed on port 8081.
110112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Datasource configuration
2+
spring.datasource.url=jdbc:mysql://localhost/dictionary?useUnicode=yes&characterEncoding=utf8
3+
spring.datasource.driverClassName=com.mysql.jdbc.Driver
4+
spring.datasource.username=dictionary
5+
spring.datasource.password=dictionary
6+
spring.datasource.test-on-borrow=true
7+
spring.datasource.test-while-idle=true
8+
spring.datasource.validation-query=SELECT 1;
9+
spring.datasource.initial-size=2
10+
spring.datasource.sql-script-encoding=UTF-8
11+
12+
spring.jpa.database=MYSQL
13+
spring.jpa.show-sql=true
14+
spring.jpa.hibernate.ddl-auto=update
15+
16+
#Server
17+
server.port=8081
18+
server.tomcat.uri-encoding=UTF-8
19+
server.compression.enabled=true
20+
server.compression.mime-types=text/html,text/plain,text/css,application/javascript,text/javascript
21+
22+
# Management
23+
endpoints.shutdown.enabled=true
24+
25+
# Template (Handlebars)
26+
handlebars.prefix: classpath:website/
27+
handlebars.suffix: .hbs
28+
handlebars.cache: true
29+
handlebars.registerMessageHelper: true
30+
handlebars.failOnMissingFile: false
31+
handlebars.prettyPrint: false
32+
33+
# Static resource
34+
spring.resources.cache-period=86400
35+
36+
# i18n
37+
spring.messages.basename=messages
38+
spring.messages.cache-seconds=-1
39+
spring.messages.encoding=UTF-8
40+
41+
# Logger
42+
logging.file=../yorubaname.log
43+
44+
#Logging
45+
logging.level.org.springframework.web=INFO
46+
logging.level.org.hibernate=INFO
47+
48+
##Security
49+
#security.user.name=admin
50+
#security.user.password=admin
51+
52+
# HTTP encoding
53+
spring.http.encoding.enabled=true
54+
spring.http.encoding.force=true
55+
spring.http.encoding.charset=UTF-8
56+
57+
# ElasticSearch
58+
es.clustername=yoruba_name_dictionary
59+
es.indexname=dictionary
60+
es.documenttype=nameentry
61+
es.hostname=localhost
62+
es.portnumber=9300
63+
# the directory elasticsearch should store its data. If blank a data directory will be created in the directory
64+
# the application is running from and that will be used.
65+
es.data.path=
66+
67+
# App settings
68+
app.host=localhost
69+
app.search.recencyLimit=5
70+
app.search.popularListLimit=5
71+
app.search.recentIndexLimit=5

0 commit comments

Comments
 (0)