Commit Graph

49447 Commits

Author SHA1 Message Date
Phillip Webb
51e6c8c8b6 Merge pull request #1 from gregturn/fix-annotation-and-typos
# By Greg Turnquist
* fix-annotation-and-typos:
  Fixed name of annotation and a typo in the code.
2013-05-27 18:38:06 -07:00
Greg Turnquist
6c4e39d4c1 Fixed name of annotation and a typo in the code. 2013-05-27 18:37:56 -07:00
Dave Syer
25f68404f3 [bs-137] "spring help" prints "Unexpected error" (when it isn't)
[#50523561]
2013-05-24 16:44:42 +01:00
Dave Syer
750b193fe4 Packaging: ensure executable bit is set 2013-05-24 14:27:56 +01:00
Dave Syer
a112717fd3 [bs-136] Add 'spring run --local ...'
Use this to download and cache the dependencies to ./grapes.
Good for running on virgin system (like PaaS).

[Fixes #50511883] Add --local to RunCommand
2013-05-24 13:51:10 +01:00
Dave Syer
35a376b403 Fix bug in test 2013-05-24 12:02:03 +01:00
Dave Syer
514cf3dcc1 [bs-129] Split up SecurityConfiguration and makes bits of it optional
* Added security.basic.* and security.sessions
* Also security.enabled (so you can switch it off on command line)

[Fixes #50181269]
2013-05-24 06:01:40 +01:00
Dave Syer
e649ef44cc [bs-107] Finish off varz->metrics
[Fixes #49496887] [bs-107] Remove trailing "z" from management endpoint URLs
2013-05-23 19:26:25 +01:00
Dave Syer
b7c0e3279e [bs-22] Add loads of actuator tests
Discovered a few issues along the way and refactored
accordingly.

[#48127729] [bs-22] Add missing unit tests
2013-05-23 18:37:48 +01:00
Dave Syer
19d8315639 Update for Spring Security snapshot 2013-05-23 14:22:08 +01:00
Dave Syer
5f7f69ad93 [bs-132] Actuator should use delegating version of MVC support
The delegating version delegates to other configurers, and it's what
@EnableWebMvc uses.  You effectively switch off the delegation if you
use the base class by mistake.

[Fixes #50267017] [bs-132] Static resources in /css/**
cannot be served by Actuator project
2013-05-22 18:23:25 +01:00
Dave Syer
29a81b8795 [bs-130] Prevent double registration
* A simple check to see if it is already registered
fixed the original problem
* Also removed the need to have @ConfigurationProperties
on a bean class (unless you want to specify the target name
etc.)

[Fixes #50256421] [bs-130] When actuator app starts the
@ConfigurationProperties are registered with the bean
factory several times
2013-05-22 15:21:07 +01:00
Dave Syer
a700ed4479 [bs-133] Move ServerProperties to spring-bootstrap core
[Fixes #50345533]
2013-05-22 13:08:12 +01:00
Dave Syer
6e52d7dd39 [bs-134] CLI app cannot resolve snapshot jars
Moved the Grab.addResolver() call to before any other compiler
customizations.

That got it working locally (removed ~/.m2 and ~/.groovy/grapes)
but still not working on cloudfoundry for some reason.  We need
more help from buildpacks there (to get a cache going for the
grapes), but there seems to be more than just that stopping it
(maybe just timeouts?).

[#50351963]
2013-05-22 11:36:54 +01:00
Dave Syer
a71bb1c972 [bs-120] Support for groovy templates
* Added GroovyTemplate.template() utility and static import in webapp CLI, so

        @RequestMapping("/")
        @ResponseBody
        String home(Model model) {
           template "home.html", model
        }

    renders the template in /templates/home.html

[Fixes #49832753]
2013-05-21 15:28:00 +01:00
Dave Syer
f73fbfc901 [bs-131] Use MapPropertySource instead of SimpleCommandLinePropertySource
[Fixes #50267831] --server.port=9000 not working on command line
2013-05-21 15:26:16 +01:00
Dave Syer
caf1aab9db [bs-22] Add tests for variour @Conditional implementations
[#48127729] [bs-22] Add missing unit tests
2013-05-21 09:51:49 +01:00
Dave Syer
c6b4c48181 [bs-22] Add tests for OnResourceCondition
[#48127729] [bs-22] Add missing unit tests
2013-05-21 09:37:07 +01:00
Dave Syer
c675d9c76e [bs-22] Add tests for Yaml processing
* Gap in logic identified, so DocumentMatcher refactored to
return an enum

[#48127729] [bs-22] Add missing unit tests
2013-05-21 09:26:35 +01:00
Dave Syer
7531c5acfb [bs-22] Add test for Batch auto config
[#48127729] [bs-22] Add missing unit tests
2013-05-21 09:26:01 +01:00
Dave Syer
09cb2f8436 [bs-76] Implement plugin model for cli support
* Because Spring is not on the classpath we don't particularly
want to use SpringFactoriesLoader
* Adopted the JDK (>=6) ServiceLoader model instead

[Fixes #48789783]
2013-05-18 19:54:20 +01:00
Dave Syer
8bb968d8f5 Switch favicon.ico value 2013-05-18 18:58:08 +01:00
Dave Syer
2861ad4106 [bs-122] Support for Spring Data DomainClassConverter
[#49906951]
2013-05-18 16:52:17 +01:00
Dave Syer
bd5fea0d8c Updates for Security snapshots 2013-05-18 16:38:48 +01:00
Dave Syer
ab121dc91b [bs-127] Add DataSourceTransactionManager if no others are in use
* If the auto config class has a high Order it can check for
an existing transaction manager
* Unit tests added, and checked also witrh petclinic

[Fixes #50064347]
2013-05-18 16:20:22 +01:00
Dave Syer
8dae41f24c Fix missing trailing / in resource paths 2013-05-18 16:03:27 +01:00
Dave Syer
a12f0dcd12 [bs-51] Add support for h2 and Derby embedded database
Also included support for database shutdown in @PreDestroy

[Fixes #48387903]
2013-05-17 17:57:56 +01:00
Dave Syer
1a0902b32a Improve logging for @Conditional processing
[Fixes #49989913] [bs-125] @Conditional* seem to get processed multiple times?
2013-05-17 17:31:31 +01:00
Dave Syer
00c227ac01 Add favicon.ico 2013-05-17 16:12:06 +01:00
Dave Syer
10573d2c74 Remove dependency-reduced-pom.xml 2013-05-17 16:10:59 +01:00
Dave Syer
6d844eb978 Allow mvn launch and shade plugin of UI sample 2013-05-17 16:08:55 +01:00
Dave Syer
a1dd6e3293 Fix data sample (needed an enum for spring.jpa.ddl_auto) 2013-05-17 16:07:40 +01:00
Dave Syer
369b0834a0 Re-order spring.factories so vanilla JPA users get component scan detection 2013-05-17 13:58:09 +01:00
Dave Syer
50f3a2c614 Add logging to BasicDataSourceConfiguration 2013-05-17 12:11:42 +01:00
Dave Syer
2dc296caa9 [bs-98] Add support for Tomcat database pool
* If Tomcat jdbc is available and the driverClassName and url
are provided or can be guessed (e.g. for HSQL) it is used.
Properties spring.database.{driverClassName,url} are consulted.

* If Commons DBCP is available it is used (if Tomcat is not)

* Otherwise an EmbeddedDatabase is created if all the bits are
available

* A JdbcOperations and a NamedParameterJdbcOperations are
available by default if a DataSource is created

* The data source is initialized from spring.database.schema (csv
of resource patterns)

[Fixes #49393511]
2013-05-17 11:57:02 +01:00
Dave Syer
74fffeba73 Rename LoggingInitializer to be consistent with others 2013-05-17 11:56:30 +01:00
Dave Syer
83b5240a0f Add some dependencies 2013-05-17 11:54:52 +01:00
Dave Syer
430ec347fd Tweak dependency versions 2013-05-16 16:38:59 +01:00
Dave Syer
73f28a3809 [bs-22] Add tests for JPA auto configuration
* Extracted the component scan detector so it can be used
without @EnableAutoConfiguration
* Added unit tests
* Improve logging in @Conditional processing

[#48127729]
2013-05-16 14:05:07 +01:00
Dave Syer
ad2e311f2f [bs-124] Add tests for @ConditionalOnBean
[#49989537] [bs-124] @ConditionalOnBean doesn't work
2013-05-16 12:14:46 +01:00
Dave Syer
6d21ff71ba Add some dependencies to starters 2013-05-16 12:13:53 +01:00
Dave Syer
728b4887c1 [bs-107] Remove "z" suffix from management endpoints
* /varz->/metrics
* /healthz->/health
* all actuator endpoints are now in a subpackage

[Fixes #49496887]
2013-05-15 16:13:23 +01:00
Dave Syer
53078c320e [bs-118], [bs-119]: add UI builder features
* MessageSource created automatically (location
spring.messages.basename:messages)
* Thymeleaf configured automatically to look for
templates in classpath:/templates
* Added static resource handlers for classpath:/static
and classpath:/

[Fixes #49832165] [bs-118] Support for thymeleaf templates
2013-05-15 15:58:18 +01:00
Dave Syer
ceea71fc38 [bs-53] Fix class loading problem with Log in a Condition 2013-05-13 17:36:07 +01:00
Dave Syer
71c0fdd22d Add service wrappers as main theme 2013-05-13 15:58:48 +01:00
Dave Syer
ad3076784d [bs-53] Aid for users debugging auto-configuration failures
Add logging to Condition implementations.

[Fixes #48389533]
2013-05-13 14:27:43 +01:00
Dave Syer
6fb8ae3d3b Add brief description of resource filtering 2013-05-12 21:58:54 +01:00
Dave Syer
ef5c8aa304 [bs-115] Add EmbeddedServletContainerCustomizer as a callback
* All instances are called before the container is started in
 a bean post processor
* Users still have to be careful because the customizer is
called very early in the ApplicationContext lifecycle (e.g.
might have to do a lookup for some dependencies instead of
@Autowired)

[Fixes #49671463] User-hook for customizing embedded servlet container
2013-05-10 17:20:08 +01:00
Dave Syer
56865ab260 Fix integration sample (no web dependencies) 2013-05-10 16:21:30 +01:00
Dave Syer
eb2adc0b99 More fixes for @Configuration processing 2013-05-10 15:52:53 +01:00