Skip to content

Commit

Permalink
chore(springBoot): Upgrade to Spring Boot 1.5.4 (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Tomsu authored and cfieber committed Aug 18, 2017
1 parent 3ad66b8 commit 922f709
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 7 deletions.
9 changes: 3 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@

buildscript {
ext {
springBootVersion = "1.2.8.RELEASE"
springBootVersion = "1.5.4.RELEASE"
}
repositories {
jcenter()
maven { url 'http://spinnaker.bintray.com/gradle/' }
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.netflix.spinnaker.gradle:spinnaker-gradle-project:3.12.0'
classpath 'com.netflix.spinnaker.gradle:spinnaker-gradle-project:3.16.0'
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
}
}
Expand All @@ -36,7 +36,7 @@ allprojects {
group = "com.netflix.spinnaker.echo"

ext {
spinnakerDependenciesVersion = project.hasProperty('spinnakerDependenciesVersion') ? project.property('spinnakerDependenciesVersion') : '0.104.0'
spinnakerDependenciesVersion = project.hasProperty('spinnakerDependenciesVersion') ? project.property('spinnakerDependenciesVersion') : '0.109.0'
}

def checkLocalVersions = [spinnakerDependenciesVersion: spinnakerDependenciesVersion]
Expand Down Expand Up @@ -70,9 +70,6 @@ allprojects {
exclude group: 'javax.servlet', module: 'servlet-api'
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
exclude group: 'org.slf4j', module: 'slf4j-simple'
resolutionStrategy {
force 'com.google.guava:guava:15.0'
}
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright 2017 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.netflix.spinnaker.echo.config

import org.apache.velocity.app.VelocityEngine
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration

@Configuration
class VelocityConfig {

@Bean
VelocityEngine velocityEngine(){
Properties properties = new Properties()
properties.load(this.getClass().getResourceAsStream("/application.properties"))
return new VelocityEngine(properties)
}
}
2 changes: 2 additions & 0 deletions echo-web/config/echo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ orca:

search:
index: 'event_history'

management.health.mail.enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package com.netflix.spinnaker.echo

import org.springframework.boot.autoconfigure.EnableAutoConfiguration
import org.springframework.boot.builder.SpringApplicationBuilder
import org.springframework.boot.context.web.SpringBootServletInitializer
import org.springframework.boot.web.support.SpringBootServletInitializer
import org.springframework.context.annotation.ComponentScan
import org.springframework.context.annotation.Configuration
/**
Expand Down
9 changes: 9 additions & 0 deletions echo-web/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Velocity support in Spring Boot 1.5.x
# source: https://stackoverflow.com/questions/42109387/velocity-with-springboot-1-5-x

resource.loader=jar
jar.resource.loader.class=org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
jar.runtime.log.logsystem.class=org.apache.velocity.runtime.log.SimpleLog4JLogSystem
jar.runtime.log.logsystem.log4j.category=velocity
jar.resource.loader.cache=true
input.encoding=UTF-8

0 comments on commit 922f709

Please sign in to comment.