Commit Graph

4501 Commits (aa1f84d037167220ea17d1d50b38fba77b52258a)
 

Author SHA1 Message Date
Andy Wilkinson 02859cc2d4 Merge branch '1.2.x' 10 years ago
Andy Wilkinson ebb8d0c55f Read the time of a JarEntryData using MSDOS Date Time format
The format is rather unusual.

The time is 16 bits: 5 bits for the hour, 6 bits for the minutes, and 5
bits for the seconds. 5 bits only allows 32 values (0-31) so the number
must be doubled, meaning that the time is only accurate to the nearest
two seconds. Also, the JDK rounds this down by subtracting one. The
doubling and rounding is performed by shifting one place to the left
and masking off the right-most bit respectively.

The date is 16 bits: 7 bits for the year, 4 bits for the month, and 5
bits for the day. The year is from 1980, i.e. the earliest date that
can be represented is 1980-01-01.

See http://mindprod.com/jgloss/zip.html for more details of the format.

Fixes gh-2826
10 years ago
Andy Wilkinson 3f44a6fc4d Merge branch '1.2.x' 10 years ago
Andy Wilkinson 764e34b9db Don’t start child context for actuator endpoints when not embedded
Prior to this commit, EndpointWebMvcAutoConfiguration would start a
child context if the management port was different to the server port
and the application context was a web application context. This caused
two problems:

If a user built an executable war and configured the management port so
that it was different to the server port, their application would run
successfully when launched with java -jar, but it would fail when
deployed to Tomcat as an attempt would be made to start embedded Tomcat.

Secondly, if a user ran a test annotated with @WebAppConfiguration the
main embedded Tomcat instance would not be started, but the child
context would trigger the creation of a Tomcat instance listening on the
configured management port. This is unexpected as @WebIntegrationTest
or @IntegrationTest and @WebAppConfiguration should be required to have
the test trigger full startup of the application and listen on the
configured ports.

This commit updates EndpointWebMvcAutoConfiguration so that it will only
start a child context when the management port is different to the
server port and the EmbeddedWebApplicationContext has an embedded
servlet container. This resolves the two problems described above as
there will be no embedded servlet container when deployed to a
standalone container or when a test is run without @IntegrationTest.

Fixes gh-2798
10 years ago
Andy Wilkinson 825d01ea7d When cache names clash include clash manager name in all prefixes
Previously, when multiple cache managers had a cache with the same name,
the prefix for the first cache that was processed would not include its
cache manager’s name, but all subsequent prefixes would include the
cache manager’s name. This was inconsistent, and due to the cache
managers being unordered, the prefixing was not deterministic.

This commit updates the prefixing logic so that when there is a clash,
all of the affected prefixes will include the name of the cache manager.
For example, with cache managers named first and second and each
with a cache named users, the prefixes will be cache.first_users and
cache.second_users rather than cache.users and
cache.{first|second}_users.

Closes gh-2824
10 years ago
Phillip Webb c2e2bc879e Fix broken RepackerTests on Windows
Update test to deal with the fact that POSIX operations aren't available
on Windows.

Fixes gh-1117
10 years ago
Andy Wilkinson 834276aa2b Improve diagnostics in PublicMetricsAutoConfigurationTests
multipleCacheManagers fails on the CI server but does not fail
locally. This commit updates assertMetrics to include information
about the actual metrics so it's clear why the expectation was not
met.
10 years ago
Andy Wilkinson dcd0eb7895 Update to Dependency Management Plugin 0.5.0.RELEASE
Closes gh-2822
10 years ago
Stephane Nicoll bbbb34a690 Expose cache statistics as metrics
Add an abstraction that provides a standard manner to retrieve a
statistics snapshot of a cache.

Specific implementations for JSR-107, ehcache, hazelcast, guava and
concurrent map are provided. At the moment the size of the cache and
the hit/miss ratios are recorded. Cache metrics are exposed via the
`cache.` prefix followed by the name of the cache. In case of conflict,
the name of the cache manager is added as a qualifier.

It is possible to easily register a new CacheStatisticsProvider for an
unsupported cache system and the CacheStatistics object itself can be
extended to provide additional metrics.

See gh-2633
Closes gh-2770
10 years ago
Stephane Nicoll 578bd5dc37 Add TransactionTemplate auto-configuration
Provide a TransactionTemplate if one PlatformTransactionManager is
present.

Relocated the jta support as a nested package of the new transaction
package that hosts the transaction template auto-configuration. To avoid
package tangles, links between auto-configurations have been reversed.

Closes gh-2464
Closes gh-2809
10 years ago
Andy Wilkinson cee8c5c1c3 Upgrade to Undertow 1.2.0.CR1
See gh-2821
10 years ago
Stephane Nicoll 5d57f51ba1 Merge pull request #2749 from eddumelendez/gh-2633-docs
* gh-2633-docs:
  Add spring.cache keys documentation
10 years ago
Eddú Meléndez bd93c75216 Add spring.cache keys documentation
See gh-2633
10 years ago
Stephane Nicoll e55c9a1b80 Add missing dot in property description 10 years ago
Andy Wilkinson 5608a594bc Merge branch '1.2.x' 10 years ago
Andy Wilkinson 0c7708bf9f Update MetricFilter to treat an unsuccessful call to doFilter as a 500
Previously, if a call to doFilter in MetricFilter failed (i.e. it threw
an exception), it would be handled as if it had a response status of
200. This is because the servlet container was yet to handle the
exception and set the response status to 500.

This commit updates MetricFilter to assume that an exception thrown from
doFilter will result in a response with a status of 500. Strictly
speaking, even though the filter has highest precedence and will
therefore run last on the way back out, this may not always be the case.
For example, a custom Tomcat Valve could handle the exception and result
in a 200 response but that’s an edge case that’s into shooting yourself
in the foot territory.

Closes gh-2818
10 years ago
Andy Wilkinson fdd3f12ee0 Merge branch '1.2.x' 10 years ago
Andy Wilkinson 4f988d2aec Polish log message in AutoConfigurationReportLoggingInitializer 10 years ago
Andy Wilkinson 734f5c39f7 Upgrade to Groovy 2.4.3
Closes gh-2819
10 years ago
Andy Wilkinson 7f3f0e6c75 Upgrade to Flyway 3.2.1
Closes gh-2675
10 years ago
Andy Wilkinson d5c0884d3d Merge branch '1.2.x'
Conflicts:
	spring-boot-dependencies/pom.xml
10 years ago
Andy Wilkinson 2d7c0c2f00 Provide dependency management for Antlr 2
Hibernate depends on antlr:antlr:2.7.7 (the latest version on Antlr 2)
and fails with earlier 2.7.x versions due to a missing method. This
can cause problems for Maven users if they also depend on something that
pulls in an earlier version of Antlr, such as
spring-boot-starter-velocity. Gradle users are unaffected as, when
multiple versions of a dependency are found in the graph, Gradle will
choose the latest version.

This commit adds dependency management for antlr:antlr:2.7.7 to ensure
that the latest, and Hibernate compatible, version of Antlr 2 is used.

Closes gh-2814
10 years ago
Stephane Nicoll f480c0de2f Merge branch '1.2.x' 10 years ago
Stephane Nicoll 0f14210937 Polish documentation 10 years ago
Phillip Webb e1152b4db8 Merge branch '1.2.x' 10 years ago
Phillip Webb dd19dd70c5 Update relaxed binding documentation sample
Include getters and setters with the sample class.

Fixes gh-2813
10 years ago
Christian Laakmann 24ca44dbb4 Fix Elasticsearch health indicator
- added setIndices to ElasticsearchHealthIndicatorProperties to enable
  setting the indices property from configuration files
- Elasticsearch cannot handle "null" if the health of all indices should
  be checked; use "_all" instead

Closes gh-2812
10 years ago
Stephane Nicoll bbaaaeb9cf Merge branch '1.2.x' 10 years ago
Stephane Nicoll 08959286e2 Fix "keys-to-sanitize" property doc 10 years ago
Stephane Nicoll 476f232d49 Fix "spring.mandatory-file-encoding" property doc 10 years ago
Stephane Nicoll 7a4e246f08 Fix typo 10 years ago
Stephane Nicoll 452ce0ffad Polish
Add setter for cache names so that it can be bound both via indexed
access and comma-separated list.
10 years ago
Dave Syer ff637d3aaa Re-write of path parsing pieces of RelaxedDataBinder
Keys with explicit indexes (e.g. foo[bar]) were handled only
partially before this change and in quite a crude way. The main
new feature (or fixed bug if you prefer) is that map keys with
periods were not identified correctly, so foo[bar.spam] came out
wrong. By scanning the key for indexes "[]" first, we can split
the logic better to make sure that all keys can be explicitly
indexed if desired. I believe this would work in YAML as well
but it definitely works for properties file inputs.

Fixes gh-2387 (I believe)
10 years ago
Phillip Webb 44a708ea5c Merge pull request #2252 from bsideup/feature/grep-metrics
* feature/grep-metrics:
  Add additional MetricsMvcEndpoint regex tests
  Add regex support to /metrics and /env endpoints
10 years ago
Sergey Egorov a60df81845 Add additional MetricsMvcEndpoint regex tests
Update MetricsMvcEndpointTests to test for regular expression based
calls.

Closes gh-2252
10 years ago
Phillip Webb 8ca5635b69 Add regex support to /metrics and /env endpoints
Update MetricsMvcEndpoint and EnvironmentMvcEndpoint to support regex
filter of names.

See gh-2252
Add it
10 years ago
Phillip Webb ebccedcfdd Add FlywayMigrationStrategy support
Update FlywayAutoConfiguration to support pluggable migration
strategies. Rather than always calling flyway.migrate(), users can now
provide a FlywayMigrationStrategy @Bean to call whatever methods they
wish.

Fixes gh-1814
10 years ago
Phillip Webb e4aab1cf0d Merge pull request #2736 from Nowheresly/fix747
* fix747:
  Support ANSI color from gradle bootRun
10 years ago
Sylvère Richard d8308cbf45 Support ANSI color from gradle bootRun
Update the BootRunTask to record the state of the System.console() so
that it can be picked up later by AnsiOutput.

Fixes gh-747
10 years ago
Phillip Webb ba2ea301f1 Merge branch 'gh-1117' 10 years ago
Phillip Webb ed57adb5fe Update deployment documentation
Change the "cloud deployment" section to cover general "deployment" and
add documentation for init.d and systemd support.

Closes gh-1117
10 years ago
Phillip Webb 793481843c Support embedded jar initialization scripts
Update the Maven and Gradle plugin to generate fully executable jar
files on Unix like machines. A launcher bash script is added to the
front of the jar file which handles execution.

The default execution script will either launch the application or
handle init.d service operations (start/stop/restart) depending on if
the application is executed directly, or via a symlink to init.d.

See gh-1117
10 years ago
Phillip Webb ffc5d565c8 Merge branch '1.2.x' 10 years ago
Phillip Webb e94de70358 Polish 10 years ago
Andy Wilkinson ba3d4e9e3c Upgrade to Spring Security 4
This commit updates Spring Boot to use Spring Security 4. As a result
of this, the coordinates of Thmyeleaf's Spring Security extra, for
which dependency management and auto-configuration is provided, have
been updated to the Spring Security 4 variant.

Closes gh-2727
10 years ago
Andy Wilkinson d3c70fa198 Merge branch '1.2.x' 10 years ago
Dave Syer 8cdff1cf70 Fix bug in trace repository
When reverse==false we have to be careful to remove the right element
when capacity is reached.
10 years ago
Andy Wilkinson d13878e193 Upgrade to Spring Data Fowler RELEASE
The versions in the dependency management for the various datastore
dependencies have been aligned with those used by Spring Data Fowler.

The Data REST tests and sample application has been updated to configure
the base path in favour of the deprecated base uri property

Closes gh-2673
10 years ago
Dave Syer 76ca00fa0d Merge branch '1.2.x' (trace repository reverse) 10 years ago
Dave Syer 8ef21b31ad Add flag to TraceRepository to reverse order of listing
Default to true (so existing apps change their behaviour, but that
seems to be the majority vote).

Fixes gh-2794
10 years ago