Commit Graph

204 Commits

Author SHA1 Message Date
Andy Wilkinson f2e3e274a8 Merge branch '2.1.x' 2019-02-21 08:19:43 +00:00
Stephane Nicoll 34f28b4cbd Merge branch '2.1.x' 2019-02-20 13:25:01 +01:00
Stephane Nicoll 91a005f578 Resolve generic types in generated metadata
Closes gh-15850
2019-02-20 13:24:40 +01:00
Stephane Nicoll 8d1d3fb087 Polish "Avoid string concatenation inside StringBuilder append()"
Closes gh-15589
2019-01-11 08:30:12 +01:00
igor-suhorukov 59ac85d371 Avoid string concatenation inside StringBuilder append()
See gh-15589
2019-01-11 08:28:19 +01:00
dreis2211 46e59503ec Use JSONObject.putOpt in JsonConverter
Closes gh-15595
2019-01-02 09:48:35 +01:00
igor-suhorukov cbf6b330ba Simplify code by using Map computeIfAbsent
Closes gh-15543
2018-12-21 11:12:56 +01:00
Phillip Webb f3fa20b2d1 Polish 2018-10-29 14:25:45 -07:00
Madhura Bhave f0004c4ade Merge branch '2.0.x' 2018-10-22 14:57:10 -07:00
dreis2211 5c0d7f4ac0 Avoid creation of unnecessary collections
Closes gh-14916
2018-10-22 14:54:39 -07:00
Phillip Webb d76bba5e6f Migrate from ExpectedException rule to AssertJ
Replace ExpectedException JUnit rules with AssertJ exception
assertions.

Closes gh-14336
2018-10-02 10:55:28 -07:00
durigon 7aaeefbc0e Use Matcher from pre-compiled Pattern rather than String for replaceAll
Closes gh-14483
2018-09-17 10:54:54 +01:00
Stephane Nicoll 0493355241 Use deterministic order for configuration properties metadata
This commit updates the annotation processor to write metadata in a
consistent way. Groups, properties and hints are written and each item
is ordered alphabetically based on its name.

Also, deprecated items are written last.

Closes gh-14347
2018-09-08 08:20:43 +02:00
Andy Wilkinson 8ee4775820 Polish 2018-09-04 20:46:35 +01:00
Stephane Nicoll c0e45b7333 Adapt to Spring Framework API change 2018-09-04 14:09:57 +02:00
Stephane Nicoll 91af9e2ca9 Merge branch '2.0.x' 2018-08-20 10:34:03 +02:00
Stephane Nicoll d80ed27339 Fix checkstyle violation 2018-08-20 10:33:46 +02:00
Stephane Nicoll b26dedb547 Merge branch '2.0.x' 2018-08-20 10:26:21 +02:00
dreis2211 0bc66dc4a9 Replace loops with Arrays.setAll where possible
See gh-14125
2018-08-20 10:16:50 +02:00
dreis2211 a601bc863b Remove unused method in TypeUtils
Closes gh-14130
2018-08-19 15:39:39 +02:00
Stephane Nicoll 8f2ab952f5 Polish javadoc formatting 2018-08-16 17:19:25 +02:00
Stephane Nicoll 94013aaba6 Add support for DataSize
This commit adds support for Spring Framework's `DataSize` allowing to
express a size in bytes and other convenient units.

Similar to the `Duration` support introduced previously, this commit
adds transparent binding support as well as detection of default values
in `@ConfigurationProperties`-annotated object.

Closes gh-13974
2018-08-13 16:43:23 +03:00
Johnny Lim 05a7d21305 Polish ItemMetadata.buildName()
Closes gh-14024
2018-08-09 09:47:02 +02:00
dreis2211 66b1742f96 Optimize some StringBuilder.append() calls
Closes gh-13961
2018-08-01 08:41:03 +02:00
Phillip Webb aeb885192e Polish ternary expressions 2018-07-29 09:24:46 +01:00
Phillip Webb 63b609827e Fix checkstyle method order issues
Fix checkstyle issues with method ordering following the
spring-javaformat upgrade.

See gh-13932
2018-07-28 01:11:53 +01:00
Phillip Webb e6a68b39a3 Fix checkstyle javadoc issues
Fix checkstyle issues in javadoc following the spring-javaformat
upgrade.

See gh-13932
2018-07-28 01:11:52 +01:00
Phillip Webb 7fc455654a Fix checkstyle ternary issues
Fix checkstyle issues with ternary expressions following the
spring-javaformat upgrade.

See gh-13932
2018-07-28 01:11:52 +01:00
Stephane Nicoll ffe994335e Merge branch '1.5.x' into 2.0.x 2018-07-16 14:12:16 +02:00
Stephane Nicoll 174cc2bc4e Merge branch '1.5.x' into 2.0.x 2018-07-13 09:25:42 +02:00
dreis2211 ac8eebfbad Fix typos
Closes gh-13762
2018-07-13 07:54:03 +02:00
Stephane Nicoll 9e9e746554 Merge branch '1.5.x' into 2.0.x 2018-06-21 09:17:05 +02:00
Johnny Lim f34fb5f1ee Reduce object creation in findMatchingItemMetadata()
Closes gh-13473
2018-06-15 13:36:55 +02:00
Johnny Lim f385a1cb11 Polish
Closes gh-13243
2018-05-28 09:36:15 +02:00
Phillip Webb 6d8b4710d7 Merge branch '1.5.x' into 2.0.x 2018-05-21 17:18:49 -07:00
Stephane Nicoll 7b7e802129 Merge branch '1.5.x' into 2.0.x 2018-05-16 13:16:54 +02:00
Phillip Webb 5b3cb8a698 Update copyright header year for changed files 2018-05-04 15:59:26 -07:00
Phillip Webb 6e09e497f2 Formatting 2018-05-04 12:06:19 -07:00
Phillip Webb 41efea51a7 Polish ternary expressions
Consistently format ternary expressions and always favor `!=` as the
the check.
2018-05-03 22:43:12 -07:00
Phillip Webb e125085993 Merge branch '1.5.x' into 2.0.x 2018-05-03 12:43:50 -07:00
Stephane Nicoll 79c222da78 Allow to provide manual metadata for keys that are not unique
Closes gh-12193
2018-05-02 16:04:02 +02:00
Stephane Nicoll 782d8c63da Merge branch '1.5.x' into 2.0.x 2018-05-02 15:59:56 +02:00
Phillip Webb 685babc829 Polish "Use lambdas for map entry iteration where possible"
Closes gh-12626
2018-04-04 19:36:18 -07:00
igor-suhorukov 69bc19e0ca Use lambdas for map entry iteration where possible
See gh-12626
2018-04-04 19:36:10 -07:00
Madhura Bhave 8b29823885 Prevent StackOverFlowException in metadata processor
Fixes gh-11037
2018-03-28 07:58:13 -07:00
Phillip Webb a4b0be089d Polish 2018-03-14 14:05:26 -07:00
dreis2211 0d3f3e46dd Fix typos
Closes gh-12468
2018-03-13 17:42:19 -07:00
Stephane Nicoll 7d1faa1c88 Ignore static and abstract accessors
This commit updates the annotation processor and the binder to ignore
any static or abstract method that has the characteristics of a JavaBean
accessor. As a result, no property is generated for those (invalid)
accessor and no binding occurs on them either.

Closes gh-12390
2018-03-07 17:55:12 +01:00
igor-suhorukov 56cbc65e7b Polish
See gh-12236
2018-02-28 08:58:46 +01:00
Phillip Webb 29c3be3590 Polish 2018-02-26 10:26:02 -08:00
igor-suhorukov 98f4692c62 Polish
This commit changes invocations to immediately return the expression
instead of assigning it to a temporary variable. The method name should
be sufficient for callers to know exactly what will be returned.

Closes gh-12211
2018-02-25 10:59:02 +01:00
Stephane Nicoll 3fddfee65c Fix default value of endpoint's cache ttl
Closes gh-12173
2018-02-22 13:35:50 +01:00
igor-suhorukov fe023817c7 Polish static finals
Closes gh-12083
2018-02-19 20:10:58 -08:00
Johnny Lim 88b184ca23 Polish 2018-02-19 20:00:20 -08:00
Andy Wilkinson 76a450dfba Format with Eclipse Oxygen SR2 2018-02-08 10:53:53 +00:00
Johnny Lim 3cead7693d Polish
Closes gh-11871
2018-02-01 08:35:42 +01:00
Phillip Webb 187c4d728c Merge branch '1.5.x' 2018-01-30 12:47:30 -08:00
Stephane Nicoll 51c307f643 Merge branch '1.5.x' 2018-01-30 16:43:54 +01:00
Phillip Webb af50a18da9 Polish 2018-01-29 09:47:03 -08:00
Stephane Nicoll 5e26d04c05 Only generate time-to-live property for matching endpoints
This commit makes sure that a "cache.time-to-live" property is not
generated for endpoints that do not have a main read operation (i.e. a
read operation with no parameter or only nullable parameters).

This matches the endpoint feature that provides caching for only such
operation.

Closes gh-11703
2018-01-27 06:11:01 +01:00
Phillip Webb b234501af3 Polish 2018-01-26 11:39:41 -08:00
igor-suhorukov 093ca0a687 Use EnumMap whenever possible
Replace regular Map instances with EnumMap to reduce memory consumption.

Closes gh-11760
2018-01-24 16:24:47 -08:00
Phillip Webb ab6ad6aa4b Polish 2018-01-24 16:09:14 -08:00
andrey.onufreyko b19dcb13e2 Replace string arguments with char
Optimize method calls by replacing single character String arguments
with char.

Closes gh-11680
2018-01-22 16:35:06 -08:00
dreis2211 b7e663e820 Polish
Closes gh-11724
2018-01-22 15:59:20 -08:00
Phillip Webb f3379668ac Polish 2018-01-18 23:21:51 -08:00
Phillip Webb 6d93573db0 Merge branch '1.5.x' 2018-01-18 22:03:51 -08:00
Stephane Nicoll ba6be4f22f Merge branch '1.5.x' 2018-01-18 22:35:32 +01:00
Stephane Nicoll 49b5fe0c29 Polish
As `validation-api` 2 is available by default, this commit adds the
integration test as a regular test case. The integration test is kept to
exercise what happens in a standard project.

See gh-11512
2018-01-18 14:05:24 +01:00
Stephane Nicoll 60f5cf10ba Merge branch '1.5.x' 2018-01-18 13:59:19 +01:00
Andy Wilkinson 54c0cf513b Polish 2018-01-17 19:03:23 +00:00
Stephane Nicoll f8af6c8134 Merge branch '1.5.x' 2018-01-17 13:42:56 +01:00
Johnny Lim 77150f8dc9 Polish
Closes gh-11630
2018-01-15 10:20:31 +01:00
Phillip Webb 87bccb96f1 Merge branch '1.5.x' 2018-01-08 13:17:51 -08:00
Stephane Nicoll 66d58294d5 Merge branch '1.5.x' 2018-01-08 17:46:16 +01:00
Stephane Nicoll f2d3f51f3f Merge branch '1.5.x' 2018-01-08 16:04:19 +01:00
Stephane Nicoll ac004eabf3 Update copyright header
See gh-11510
2018-01-05 10:30:43 +01:00
Johnny Lim 37d8eedae3 Polish
Closes gh-11510
2018-01-05 10:29:22 +01:00
Stephane Nicoll 03dd53f347 Fix broken merge 2018-01-04 10:16:27 +01:00
Stephane Nicoll e3bfd797a3 Merge branch '1.5.x' 2018-01-04 10:11:32 +01:00
Madhura Bhave 8102dc78cb Remove redundant throws declarations 2017-12-29 12:10:13 -08:00
Johnny Lim 3c5ccb1166 Polish
Closes gh-11418
2017-12-26 09:47:10 +01:00
Phillip Webb 3273859fde Polish 2017-12-13 14:32:55 -08:00
Stephane Nicoll a626f5462d Consistent use of @AliasFor
Closes gh-10836
2017-12-13 14:42:16 +01:00
Stephane Nicoll b6aa0f24e2 Clean endpointIds in generated metadata
Closes gh-11107
2017-12-13 10:18:08 +01:00
Stephane Nicoll 7f2af8b209 Polish 2017-12-13 09:46:41 +01:00
Stephane Nicoll 23218add90 Polish 2017-12-12 11:57:30 +01:00
Andy Wilkinson aa9c5e6e08 Align expectation with new endpoint enabled property description
See gh-10870
2017-11-21 11:38:50 +00:00
Phillip Webb e82913dd5a Align appendix edits with source code
Port editing changes from append to java source files to ensure that
IDE meta-data also reflects the improvements.

Closes gh-10870
2017-11-20 15:47:49 -08:00
Phillip Webb cbaf0fa686 Support Duration in generated meta-data
Update the configuration properties annotation processor to deal
with `Duration` based default values. For example a field that
defaults to `Duration.ofSeconds(10)` will have a meta-data default
value of `10s`.

See gh-11080
2017-11-19 21:51:10 -08:00
Johnny Lim 1783a072ad Remove explicit constructor super() calls
Closes gh-11068
2017-11-17 16:44:16 -08:00
dreis2211 1e4941e29a Use StandardCharsets where possible
Closes gh-11036
2017-11-16 10:34:44 +01:00
Stephane Nicoll bcab23e538 Polish "Separate endpoint concerns"
* Fix the endpoint prefix for generated metadata.
* Polish and improve configuration key descriptions.

Closes gh-10176
2017-11-16 10:32:34 +01:00
Phillip Webb fd5c43cdc9 Separate endpoint concerns
Update endpoint code to provide cleaner separation of concerns.
Specifically, the top level endpoint package is no longer aware of
the fact that JMX and HTTP are ultimately used to expose endpoints.
Caching concerns have also been abstracted behind a general purpose
`OperationMethodInvokerAdvisor` interface.

Configuration properties have been refined to further enforce
separation. The `management.endpoint.<name>` prefix provides
configuration for a  single endpoint (including enable and cache
time-to-live). These  properties are now technology agnostic (they
don't include `web` or `jmx` sub properties).

The `management.endpoints.<technology>` prefix provide exposure specific
configuration. For example, `management.endpoints.web.path-mapping`
allow endpoint URLs to be changed.

Endpoint enabled/disabled logic has been simplified so that endpoints
can't be disabled per exposure technology. Instead a filter based
approach is used to allow refinement of what endpoints are exposed over
a given technology.

Fixes gh-10176
2017-11-15 14:41:38 -08:00
Johnny Lim bd0dcfb172 Utilize StandardCharsets
Closes gh-10972
2017-11-10 09:49:13 +01:00
Phillip Webb c55b5d7111 Polish 2017-11-01 23:14:52 -07:00
Andy Wilkinson 6f55b57855 Make discovery of additional config metdata more robust with Gradle
Previously, the configuration metadata annotation processor relied
upon an additional metadata file have been copied to an output
location. When building with Gradle, it's the processResources task
that performs this copy and there is no guarantee that it will have
run before the compileJava task unless an explicit dependency betwee
the two tasks has been configured. If a project is built using
Gradle's parallel build support, the likelihood of this required
ordering not occurring increases.

This commit updates the configuration metadata annotation processor to
consider a new annotation processor option when looking for the
additional config metadata file. The Gradle plugin has been updated
to provide this option as a compiler argument. The option is only
provided when the annotation processor is found on the compilation
classpath to avoid a warning from javac's annotation processing about
the use of an option that is not supported by any of the available
annotation processors.

Closes gh-9755
2017-10-31 14:31:51 +00:00
Stephane Nicoll 56afc25304 Allow to customize the path of a web endpoint
This commit introduces a endpoints.<id>.web.path generic property that
allows to customize the path of an endpoint. By default the path is the
same as the id of the endpoint.

Such customization does not apply for the CloudFoundry specific
endpoints.

Closes gh-10181
2017-10-26 14:36:14 +02:00
Andy Wilkinson 2b426c30a6 Polish “Remove explicit type arguments”
Closes gh-10494
2017-10-24 14:44:26 +01:00
Johnny Lim 6168fae720 Remove explicit type arguments
See gh-10494
2017-10-24 14:44:20 +01:00
Johnny Lim 5aa32b3d0f Polish
Closes gh-10636
2017-10-17 15:29:13 +02:00
Phillip Webb 748e0779b6 Update copyright year for changed files 2017-10-10 11:56:13 -07:00
Phillip Webb b87f9c11f1 Fix POMs for the updated build/release process
Fix POMs following project relocations and apply CI friendly Maven
conventions.

See gh-9316
2017-10-04 16:34:38 -07:00
Phillip Webb 0ba4830b4f Relocate projects to spring-boot-project
Move projects to better reflect the way that Spring Boot is released.

The following projects are under `spring-boot-project`:

  - `spring-boot`
  - `spring-boot-autoconfigure`
  - `spring-boot-tools`
  - `spring-boot-starters`
  - `spring-boot-actuator`
  - `spring-boot-actuator-autoconfigure`
  - `spring-boot-test`
  - `spring-boot-test-autoconfigure`
  - `spring-boot-devtools`
  - `spring-boot-cli`
  - `spring-boot-docs`

See gh-9316
2017-10-04 16:34:23 -07:00