Commit Graph

11370 Commits (99aa155412214f75b3e0a0cd9c737e036c23b773)
 

Author SHA1 Message Date
Dave Syer e60efc7e55 [bs-17], [bs-146] Add some ApplicationContextInitializers
* One for Cloud Foundry and one for the application context ID
* If app runs in Cloud Foundry vcap.application.* and vcap.services.*
will be populated in the Environment
* The ApplicationContext ID is set to something supposedly unique
(e.g. name:index in a Cloud Foundry app)

[#50968415] [#48153639]
12 years ago
Dave Syer e0d7fc2240 Tweaks to config file intializer 12 years ago
Phillip Webb 9cf33c33fa [bs-52] Allow war files to run in place
Update RandomAccessJarFile to work around EOFExceptio on JDK 6

[#48386505] [bs-52] Support for running "traditional" webapps in place
12 years ago
Dave Syer a6c03e72e6 [bs-138] Add categories (secure,open) to EndpointsProperties 12 years ago
Dave Syer c99d7a0a09 Use ResourceLoader from condition context if avilable 12 years ago
Phillip Webb aded15227f [bs-36] Add Tomcat/Jett MVC integration tests
Add integration tests to check that embedded Jetty and Tomcat containers
can run full Spring MVC applications.
12 years ago
Phillip Webb a4aef0e0e9 [bs-52] Allow war files to run in place
Update AbstractEmbeddedServletContainerFactory to detect the document
root from a classically packaged war file.

[#48386505] [bs-52] Support for running "traditional" webapps in place
12 years ago
Dave Syer e98368e3e6 [bs-52] Add configuration for trad sample running as war
The launcher project is used to run a war file.  Not working yet for
me anyway.

[#48386505] [bs-52] Support for running "traditional" webapps in place
12 years ago
Dave Syer 3c34326208 [bs-141] Add Bootstrap WebApplicationInitializer got traditional wars
[#50806851] [bs-141] First class escape hatch from jar to war for web applications
12 years ago
Phillip Webb 7e3c158f3a Polish 12 years ago
Dave Syer 969c7d6fa1 Make sure ThymeleafAutoConfiguration works if imported directly
Before this change if Layout dialect not available then the nested class is
loaded and barfs because it depended on the layout dialect (in a
@ConditionalOnClass annotation).
12 years ago
Dave Syer f12b3fbcd7 [bs-143] Add LiveBeansView to Actuator app on /beans
As per standard LiveBeansView features, if spring.liveBeansView.mbeanDomain
is set in the Environment, then all application contexts are displayed,
otherwise only the local one.  Only JSON is served (via produces=).

[Fixes #50879457]
12 years ago
Dave Syer 990627b328 [bs-144] Make EmbedddedContainerConfiguration an import selector
Previously EmbedddedContainerConfiguration cannot be imported directly.
This change ensures that the nested classes are not loaded automatically
so there can be no issues with the annotation parameters.

There might be a case for a change in Spring here since the framework
itself could just be more cautious when processing nested classes.

[Fixes #50880927]
12 years ago
Dave Syer 6c22e0ab6e [bs-140] Extract framework-provided @ConfigurationProperties into @Bean
Allows @ConfigurationProperties beans to be declared explicitly (to set default values)

[#50804109]
12 years ago
Dave Syer cf201ffd80 [bs-142] Add @AssertMissingBean
Example usage is to fail fast if trying to provide
a @ConfigurationProperties bean and it was already
defined

[Fixes #50812235]
12 years ago
Dave Syer 8023a862c3 Add test for @ConfigurationProperties
Various parent context topologies are tried to ensure that the properties
are bound sensibly.

[#50804109] Allow @ConfigurationProperties beans to be declared
explicitly (to set default values)
12 years ago
Dave Syer 3ba5f56808 [bs-138] Add @OnManagementContext for management beans
User adds @OnManagementContext to a bean or @Configuration and
it should be included in the management context (if there is one)
whether it is the main context or a child.

Makes it easy to secure the management endpoints and keep
the rest open (see actuator-ui-sample).

[#50721675]
12 years ago
Dave Syer 729cfe813b [bs-22] Add more unit tests 12 years ago
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