Commit Graph

152 Commits (aabff1a77496329836a102517be210e817e96c21)
 

Author SHA1 Message Date
Dave Syer aabff1a774 [bs-61] Allow non-default servlets and filters to be registered
* The RegistrationBean (ServletInitializer) now exposes a registration
target object, and this is used to prevent double registration of those
objects.
* If there is a Servlet with bean id "dispatcherServlet" it is mapped to
"/" (unless already registered as a ServletRegistrationBean).

[Fixes #48645559]
12 years ago
Dave Syer bf30e2de90 [bs-135] Add support for closure-style options declarations
E.g.

    options {
	option "foo", "Foo set"
	option "bar", "Bar has an argument of type int"
          withOptionalArg() ofType Integer
    }

    println "Hello ${options.nonOptionArguments()}: " +
      "${options.has('foo')} ${options.valueOf('bar')}"

[#50427095] [bs-135] Plugin model for spring commands
12 years ago
Dave Syer dcdf2d00b8 [bs-135] Simplify Command interface a bit more 12 years ago
Dave Syer fc1012e77d [bs-135] Remove support for option commands
Command names stating with "--" work just as well.

[#50427095]
12 years ago
Dave Syer d950d15f9b [bs-135] Plugin model for spring commands
* Added CommandFactory and a ServiceLoader model for providing
implementations
* Added ScriptCommand (wrapping groovy script). Service providers
are recommended to implement OptionHandler in their script, but a
regulare Script or a Runnable will also work.

[#50427095]
12 years ago
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.
12 years ago
Greg Turnquist 6c4e39d4c1 Fixed name of annotation and a typo in the code. 12 years ago
Dave Syer 25f68404f3 [bs-137] "spring help" prints "Unexpected error" (when it isn't)
[#50523561]
12 years ago
Dave Syer 750b193fe4 Packaging: ensure executable bit is set 12 years ago
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
12 years ago
Dave Syer 35a376b403 Fix bug in test 12 years ago
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]
12 years ago
Dave Syer e649ef44cc [bs-107] Finish off varz->metrics
[Fixes #49496887] [bs-107] Remove trailing "z" from management endpoint URLs
12 years ago
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
12 years ago
Dave Syer 19d8315639 Update for Spring Security snapshot 12 years ago
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
12 years ago
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
12 years ago
Dave Syer a700ed4479 [bs-133] Move ServerProperties to spring-bootstrap core
[Fixes #50345533]
12 years ago
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]
12 years ago
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]
12 years ago
Dave Syer f73fbfc901 [bs-131] Use MapPropertySource instead of SimpleCommandLinePropertySource
[Fixes #50267831] --server.port=9000 not working on command line
12 years ago
Dave Syer caf1aab9db [bs-22] Add tests for variour @Conditional implementations
[#48127729] [bs-22] Add missing unit tests
12 years ago
Dave Syer c6b4c48181 [bs-22] Add tests for OnResourceCondition
[#48127729] [bs-22] Add missing unit tests
12 years ago
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
12 years ago
Dave Syer 7531c5acfb [bs-22] Add test for Batch auto config
[#48127729] [bs-22] Add missing unit tests
12 years ago
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]
12 years ago
Dave Syer 8bb968d8f5 Switch favicon.ico value 12 years ago
Dave Syer 2861ad4106 [bs-122] Support for Spring Data DomainClassConverter
[#49906951]
12 years ago
Dave Syer bd5fea0d8c Updates for Security snapshots 12 years ago
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]
12 years ago
Dave Syer 8dae41f24c Fix missing trailing / in resource paths 12 years ago
Dave Syer a12f0dcd12 [bs-51] Add support for h2 and Derby embedded database
Also included support for database shutdown in @PreDestroy

[Fixes #48387903]
12 years ago
Dave Syer 1a0902b32a Improve logging for @Conditional processing
[Fixes #49989913] [bs-125] @Conditional* seem to get processed multiple times?
12 years ago
Dave Syer 00c227ac01 Add favicon.ico 12 years ago
Dave Syer 10573d2c74 Remove dependency-reduced-pom.xml 12 years ago
Dave Syer 6d844eb978 Allow mvn launch and shade plugin of UI sample 12 years ago
Dave Syer a1dd6e3293 Fix data sample (needed an enum for spring.jpa.ddl_auto) 12 years ago
Dave Syer 369b0834a0 Re-order spring.factories so vanilla JPA users get component scan detection 12 years ago
Dave Syer 50f3a2c614 Add logging to BasicDataSourceConfiguration 12 years ago
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]
12 years ago
Dave Syer 74fffeba73 Rename LoggingInitializer to be consistent with others 12 years ago
Dave Syer 83b5240a0f Add some dependencies 12 years ago
Dave Syer 430ec347fd Tweak dependency versions 12 years ago
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]
12 years ago
Dave Syer ad2e311f2f [bs-124] Add tests for @ConditionalOnBean
[#49989537] [bs-124] @ConditionalOnBean doesn't work
12 years ago
Dave Syer 6d21ff71ba Add some dependencies to starters 12 years ago
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]
12 years ago
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
12 years ago
Dave Syer ceea71fc38 [bs-53] Fix class loading problem with Log in a Condition 12 years ago
Dave Syer 71c0fdd22d Add service wrappers as main theme 12 years ago