Skip to content

Commit 32106f6

Browse files
committed
1 parent 3e9f43c commit 32106f6

File tree

3 files changed

+111
-3
lines changed

3 files changed

+111
-3
lines changed

.travis.yml

+9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
language: java
22

3+
env:
4+
matrix:
5+
- SPRING_PROFILES_ACTIVE=test
6+
- SPRING_PROFILES_ACTIVE=travis
7+
38
before_script:
49
- npm install -g bootlint
10+
- if [ "$SPRING_PROFILES_ACTIVE" = 'travis' ]; then mysql -u travis -e 'CREATE DATABASE mystamps CHARACTER SET utf8;'; fi
511

612
script:
713
- ./src/main/scripts/ci/check-build-and-verify.sh
@@ -12,6 +18,9 @@ after_success:
1218
jdk:
1319
- oraclejdk8
1420

21+
services:
22+
- mysql
23+
1524
branches:
1625
except:
1726
- /^(re|old)_.*$/

src/main/java/ru/mystamps/web/config/StrategiesConfig.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public interface StrategiesConfig {
3434
ImagePersistenceStrategy getImagePersistenceStrategy();
3535

3636
@Profile("test")
37-
class TestStrategiesConfig implements StrategiesConfig {
37+
class DbStrategiesConfig implements StrategiesConfig {
3838

3939
@Autowired
4040
private ImageDataDao imageDataDao;
@@ -47,8 +47,8 @@ public ImagePersistenceStrategy getImagePersistenceStrategy() {
4747

4848
}
4949

50-
@Profile("prod")
51-
class ProdStrategiesConfig implements StrategiesConfig {
50+
@Profile({ "prod", "travis" })
51+
class FsStrategiesConfig implements StrategiesConfig {
5252

5353
@Autowired
5454
private Environment env;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
spring.profiles: travis
2+
3+
spring.datasource.url: jdbc:mysql://localhost:3306/mystamps
4+
spring.datasource.username: travis
5+
spring.datasource.password:
6+
spring.datasource.driver-class-name: com.mysql.jdbc.Driver
7+
spring.datasource.initialize: false
8+
spring.datasource.validation-query: SELECT 1
9+
spring.datasource.test-on-borrow: true
10+
11+
spring.jpa.database-platform: ru.mystamps.web.support.hibernate.MySql5InnoDbDialect
12+
spring.jpa.show-sql: false
13+
spring.jpa.properties.hibernate.format_sql: true
14+
spring.jpa.properties.hibernate.connection.charset: UTF-8
15+
spring.jpa.properties.hibernate.hbm2ddl.auto: validate
16+
# our mapping doesn't conform to org.springframework.boot.orm.jpa.hibernate.SpringNamingStrategy that is used by default
17+
spring.jpa.hibernate.naming_strategy: org.hibernate.cfg.EJB3NamingStrategy
18+
spring.jpa.open-in-view: false
19+
20+
spring.mail.host: 127.0.0.1
21+
spring.mail.port: 1025
22+
spring.mail.username: unused
23+
spring.mail.password: unused
24+
25+
spring.messages.cache-seconds: -1
26+
spring.messages.fallback-to-system-locale: false
27+
spring.messages.basename: \
28+
ru/mystamps/i18n/Messages, \
29+
ru/mystamps/i18n/SpringSecurityMessages, \
30+
ru/mystamps/i18n/MailTemplates
31+
32+
spring.thymeleaf.prefix: /WEB-INF/views/
33+
spring.thymeleaf.suffix: .html
34+
spring.thymeleaf.cache: true
35+
36+
liquibase.contexts: scheme, init-data, test-data
37+
liquibase.change-log: classpath:/liquibase/changelog.xml
38+
39+
logging.level.: INFO
40+
logging.level.ru.mystamps: DEBUG
41+
logging.level.org.springframework.web.servlet.handler.SimpleUrlHandlerMapping: WARN
42+
logging.level.org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping: WARN
43+
logging.level.org.hibernate.tool.hbm2ddl.TableMetadata: WARN
44+
45+
app.upload.dir: /tmp
46+
47+
spring.autoconfigure.exclude: \
48+
org.springframework.boot.autoconfigure.jms.activemq.ActiveMQAutoConfiguration \
49+
, org.springframework.boot.autoconfigure.jms.artemis.ArtemisAutoConfiguration \
50+
, org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration \
51+
, org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration \
52+
, org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration \
53+
, org.springframework.boot.autoconfigure.data.cassandra.CassandraRepositoriesAutoConfiguration \
54+
, org.springframework.boot.autoconfigure.cloud.CloudAutoConfiguration \
55+
, org.springframework.boot.autoconfigure.mobile.DeviceDelegatingViewResolverAutoConfiguration \
56+
, org.springframework.boot.autoconfigure.mobile.DeviceResolverAutoConfiguration \
57+
, org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchAutoConfiguration \
58+
, org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchDataAutoConfiguration \
59+
, org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchRepositoriesAutoConfiguration \
60+
, org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration \
61+
, org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration \
62+
, org.springframework.boot.autoconfigure.social.FacebookAutoConfiguration \
63+
, org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration \
64+
, org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration \
65+
, org.springframework.boot.autoconfigure.groovy.template.GroovyTemplateAutoConfiguration \
66+
, org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration \
67+
, org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration \
68+
, org.springframework.boot.autoconfigure.hazelcast.HazelcastJpaDependencyAutoConfiguration \
69+
, org.springframework.boot.autoconfigure.jms.hornetq.HornetQAutoConfiguration \
70+
, org.springframework.boot.autoconfigure.hateoas.HypermediaAutoConfiguration \
71+
, org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration \
72+
, org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration \
73+
, org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration \
74+
, org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration \
75+
, org.springframework.boot.autoconfigure.jms.JndiConnectionFactoryAutoConfiguration \
76+
, org.springframework.boot.autoconfigure.jdbc.JndiDataSourceAutoConfiguration \
77+
, org.springframework.boot.autoconfigure.jooq.JooqAutoConfiguration \
78+
, org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration \
79+
, org.springframework.boot.autoconfigure.social.LinkedInAutoConfiguration \
80+
, org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration \
81+
, org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration \
82+
, org.springframework.boot.autoconfigure.data.mongo.MongoRepositoriesAutoConfiguration \
83+
, org.springframework.boot.autoconfigure.mustache.MustacheAutoConfiguration \
84+
, org.springframework.boot.autoconfigure.security.oauth2.OAuth2AutoConfiguration \
85+
, org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration \
86+
, org.springframework.boot.autoconfigure.reactor.ReactorAutoConfiguration \
87+
, org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration \
88+
, org.springframework.boot.autoconfigure.data.rest.RepositoryRestMvcAutoConfiguration \
89+
, org.springframework.boot.autoconfigure.sendgrid.SendGridAutoConfiguration \
90+
, org.springframework.boot.autoconfigure.mobile.SitePreferenceAutoConfiguration \
91+
, org.springframework.boot.autoconfigure.social.SocialWebAutoConfiguration \
92+
, org.springframework.boot.autoconfigure.solr.SolrAutoConfiguration \
93+
, org.springframework.boot.autoconfigure.data.solr.SolrRepositoriesAutoConfiguration \
94+
, org.springframework.boot.autoconfigure.social.TwitterAutoConfiguration \
95+
, org.springframework.boot.autoconfigure.velocity.VelocityAutoConfiguration \
96+
, org.springframework.boot.autoconfigure.websocket.WebSocketAutoConfiguration \
97+
, org.springframework.boot.autoconfigure.websocket.WebSocketMessagingAutoConfiguration \
98+
, org.springframework.boot.autoconfigure.jdbc.XADataSourceAutoConfiguration \
99+
#

0 commit comments

Comments
 (0)