├── gradle
├── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── dependencies.gradle
├── codenarc.gradle
├── checkstyle
│ ├── suppressions.xml
│ ├── required-header.txt
│ └── checkstyle.xml
├── pom.gradle
├── checkstyle.gradle
├── javaModule.gradle
└── codenarc
│ ├── codenarc.groovy
│ └── codenarcTest.groovy
├── .gitignore
├── examples
└── spring-capgemini-trace-sample
│ ├── src
│ └── main
│ │ ├── resources
│ │ ├── addVideo.json
│ │ ├── data.sql
│ │ └── config
│ │ │ └── application.properties
│ │ └── java
│ │ └── com
│ │ └── capgemini
│ │ └── boot
│ │ └── trace
│ │ └── sample
│ │ └── video
│ │ ├── repository
│ │ ├── VideoRepository.java
│ │ └── Video.java
│ │ ├── Application.java
│ │ ├── client
│ │ └── VideoSvcApi.java
│ │ └── controller
│ │ └── VideoSvc.java
│ ├── build.gradle
│ └── README.md
├── settings.gradle
├── spring-capgemini-core
├── build.gradle
└── src
│ ├── test
│ └── groovy
│ │ └── com
│ │ └── capgemini
│ │ └── boot
│ │ └── core
│ │ ├── TestSettingBackedBean.java
│ │ ├── TestApplication.java
│ │ ├── TestFactory.java
│ │ ├── TestSettings.java
│ │ └── SettingBackedBeanCreationSpec.groovy
│ └── main
│ └── java
│ └── com
│ └── capgemini
│ └── boot
│ └── core
│ └── factory
│ ├── internal
│ ├── SettingBackedBeansConfiguration.java
│ ├── ExceptionFactory.java
│ ├── SpringBootSettingsResolver.java
│ ├── DefaultAnnotationStrategy.java
│ ├── DefaultExceptionFactory.java
│ └── SettingBackedBeanFactoryPostProcessor.java
│ ├── SettingBackedBeanFactory.java
│ ├── SettingBackedBean.java
│ ├── EnableSettingBackedBeans.java
│ ├── SettingsResolver.java
│ └── FactoryProcessorStrategy.java
├── circle.yml
├── spring-capgemini-trace
├── build.gradle
└── src
│ ├── main
│ └── java
│ │ └── com
│ │ └── capgemini
│ │ └── boot
│ │ └── trace
│ │ ├── annotation
│ │ ├── Trace.java
│ │ └── EnableTraceLogger.java
│ │ ├── TraceLoggerConfigurationUtils.java
│ │ ├── TraceLoggerConfiguration.java
│ │ ├── TraceLoggerRegistrar.java
│ │ └── settings
│ │ └── TraceLoggerSettings.java
│ └── test
│ └── groovy
│ └── com
│ └── capgemini
│ └── boot
│ └── trace
│ ├── TraceLoggerConfigurationDisabledSpec.groovy
│ ├── TraceLoggerRegistrarPointcutCrossoverSpec.groovy
│ ├── TestApplication.java
│ ├── TraceLoggerRegistrarSpec.groovy
│ ├── TraceLoggerConfigurationMessagesSpec.groovy
│ └── TraceLoggerConfigurationSpec.groovy
├── README.md
├── gradlew.bat
├── gradlew
└── LICENSE
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Capgemini/spring-boot-capgemini/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .classpath
3 | .settings
4 | .project
5 | .gradle
6 | build/
7 | bin/
8 | out/
9 | *.iml
10 | *.ipr
11 | *.iws
12 | *.idea
13 | gradle.properties
--------------------------------------------------------------------------------
/examples/spring-capgemini-trace-sample/src/main/resources/addVideo.json:
--------------------------------------------------------------------------------
1 | {"id":0,"name":"The Dark Knight","url":"http://www.imdb.com/title/tt0468569/?ref_=chttp_tt_4","duration":152}
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include \
2 | "spring-capgemini-core",
3 | "spring-capgemini-trace",
4 | "spring-capgemini-trace-sample"
5 |
6 | project(':spring-capgemini-trace-sample').projectDir = new File('examples/spring-capgemini-trace-sample/')
7 |
--------------------------------------------------------------------------------
/gradle/dependencies.gradle:
--------------------------------------------------------------------------------
1 | ext {
2 | commonVersions = [
3 | springBoot: "1.2.2.RELEASE",
4 | spock: "1.0-groovy-2.4",
5 | ]
6 |
7 | commonDependencies = [
8 | spockSpring: "org.spockframework:spock-spring:${commonVersions.spock}"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Dec 05 14:27:21 GMT 2014
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
7 |
--------------------------------------------------------------------------------
/gradle/codenarc.gradle:
--------------------------------------------------------------------------------
1 | project.apply plugin: "codenarc"
2 |
3 | codenarc {
4 | toolVersion = "0.23"
5 | }
6 |
7 | codenarcMain {
8 | configFile rootProject.file('gradle/codenarc/codenarc.groovy')
9 | }
10 |
11 | codenarcTest {
12 | configFile rootProject.file('gradle/codenarc/codenarcTest.groovy')
13 | }
--------------------------------------------------------------------------------
/gradle/checkstyle/suppressions.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/spring-capgemini-core/build.gradle:
--------------------------------------------------------------------------------
1 | archivesBaseName = 'spring-capgemini-core'
2 | description = "spring-capgemini-core"
3 |
4 | apply from: "$rootDir/gradle/javaModule.gradle"
5 |
6 | dependencies {
7 | compile "org.springframework.boot:spring-boot-starter:${commonVersions.springBoot}"
8 |
9 | testCompile "org.springframework.boot:spring-boot-starter-test:${commonVersions.springBoot}"
10 | }
--------------------------------------------------------------------------------
/circle.yml:
--------------------------------------------------------------------------------
1 |
2 | dependencies:
3 | cache_directories:
4 | - "~/.gradle"
5 |
6 | test:
7 | override:
8 | - ./gradlew clean build -i
9 | pre:
10 | - echo $BINTRAY_USER > gradle.properties
11 | - echo $BINTRAY_API_KEY >> gradle.properties
12 | post:
13 | - mkdir -p $CIRCLE_TEST_REPORTS/junit/
14 | - find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
15 |
16 | deployment:
17 | master:
18 | branch: master
19 | commands:
20 | - ./gradlew artifactoryPublish
--------------------------------------------------------------------------------
/spring-capgemini-trace/build.gradle:
--------------------------------------------------------------------------------
1 | archivesBaseName = 'trace-spring-boot'
2 | description = "trace-spring-boot"
3 |
4 | apply from: "$rootDir/gradle/javaModule.gradle"
5 |
6 | dependencies {
7 | compile "org.springframework.boot:spring-boot-starter-aop:${commonVersions.springBoot}"
8 | compile project(":spring-capgemini-core")
9 |
10 | testCompile "org.springframework.boot:spring-boot-starter-test:${commonVersions.springBoot}"
11 | testCompile("org.springframework.boot:spring-boot-starter-web:${commonVersions.springBoot}") {
12 | exclude module: "spring-boot-starter-tomcat"
13 | }
14 | testCompile "org.springframework.boot:spring-boot-starter-jetty:${commonVersions.springBoot}"
15 | }
--------------------------------------------------------------------------------
/examples/spring-capgemini-trace-sample/src/main/resources/data.sql:
--------------------------------------------------------------------------------
1 | -- This file is invoked by Spring boot by default, using Spring JDBC, more information
2 | -- here (http://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html#howto-intialize-a-database-using-spring-jdbc)
3 | insert into video (id, duration, name, url) values (1, 142, 'The Shawshank Redemption', 'http://www.imdb.com/title/tt0111161/?ref_=chttp_tt_1');
4 | insert into video (id, duration, name, url) values (2, 175, 'The Godfather', 'http://www.imdb.com/title/tt0068646/?ref_=chttp_tt_2');
5 | insert into video (id, duration, name, url) values (3, 200, 'The Godfather: Part II', 'http://www.imdb.com/title/tt0071562/?ref_=chttp_tt_3');
--------------------------------------------------------------------------------
/gradle/checkstyle/required-header.txt:
--------------------------------------------------------------------------------
1 | ^/\*\s*$
2 | ^\* Copyright \d\d\d\d((\s*-\s*\d\d\d\d)|(,\s*\d\d\d\d)+)? the original author or authors.\s*$
3 | ^\*\s*$
4 | ^\* Licensed under the Apache License, Version 2\.0 \(the "License"\);\s*$
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
--------------------------------------------------------------------------------
/examples/spring-capgemini-trace-sample/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | dependencies {
3 | classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.3.RELEASE")
4 | }
5 | repositories {
6 | jcenter()
7 | }
8 | }
9 |
10 | apply plugin: 'spring-boot'
11 |
12 | dependencies {
13 | compile "org.springframework.boot:spring-boot-starter-web:${commonVersions.springBoot}"
14 | compile "org.springframework.boot:spring-boot-starter-actuator:${commonVersions.springBoot}"
15 | compile "org.springframework.boot:spring-boot-starter-aop:${commonVersions.springBoot}"
16 | compile "org.springframework.boot:spring-boot-starter-data-jpa:${commonVersions.springBoot}"
17 | compile "com.h2database:h2:1.4.187"
18 | compile "com.google.guava:guava:17.0"
19 | compile project(":spring-capgemini-trace")
20 |
21 | runtime "org.springframework.boot:spring-boot-starter-jetty:${commonVersions.springBoot}"
22 |
23 | testCompile "org.springframework.boot:spring-boot-starter-test:${commonVersions.springBoot}"
24 | }
25 |
--------------------------------------------------------------------------------
/spring-capgemini-core/src/test/groovy/com/capgemini/boot/core/TestSettingBackedBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.capgemini.boot.core;
18 |
19 | public class TestSettingBackedBean {
20 |
21 | private String settingValue;
22 |
23 | TestSettingBackedBean(String settingValue) {
24 | this.settingValue = settingValue;
25 | }
26 |
27 | public String getSettingValue() {
28 | return settingValue;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/gradle/pom.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | ext {
18 | pomModifications = []
19 | modifyPom = { pomModifications << it }
20 | }
21 |
22 | tasks.withType(Upload) {
23 | repositories.withType(org.gradle.api.artifacts.maven.MavenResolver) {
24 | it.pom.whenConfigured { pom ->
25 | pomModifications.each {
26 | configure(pom, it)
27 | }
28 | }
29 | }
30 | }
31 |
32 | modifyPom {
33 | dependencies.removeAll { it.scope == "test" }
34 | }
35 |
--------------------------------------------------------------------------------
/examples/spring-capgemini-trace-sample/src/main/resources/config/application.properties:
--------------------------------------------------------------------------------
1 | # enables trace logging
2 | trace-logging.enabled=true
3 |
4 | # sets severity of logger to Trace for VideoSvc class. The logger is "Logback", defined in "spring-boot-starter-logging" which
5 | # is pulled in as a transititve dependency by the "spring-boot-starter-web" dependency defined in grade.build
6 | logging.level.com.capgemini.boot.trace.sample.video.controller.VideoSvc=TRACE
7 |
8 | # enables tracing of all public methods in the VideoSvc class
9 | trace-logging.pointcut.videoSvc=execution(* com.capgemini.boot.trace.sample.video.controller.VideoSvc.*(..))
10 |
11 | # enables tracing of all public methods in VideoSvc class that take a String
12 | # parameter -i.e the method "Collection