Commit Graph

50 Commits

Author SHA1 Message Date
Andy Wilkinson
46d6fb0e1c Merge branch '1.3.x' into 1.4.x 2019-03-26 13:40:26 +00:00
Spring Operator
adc2462689 Use HTTPS for external links from XML files where possible
See gh-16311
2019-03-26 13:37:30 +00:00
Andy Wilkinson
1bb5dc205d Update samples to use Artemis in place of HornetQ
Closes gh-7057
2016-09-29 11:52:09 +01:00
Johnny Lim
da16d6d306 Polishing
Closes gh-4503
2015-11-18 11:40:19 +00:00
Phillip Webb
49039c33ea Polish 2015-06-15 11:44:44 -07:00
Dave Syer
2c829c7229 Add support for Spring Retry in CLI 2015-06-12 14:55:07 +01:00
Dave Syer
c5dc3f564b Add @EnableOAuth2Sso and spring.oauth2.sso.*
User can enable OAuth2 SSO by declaring the intent (@EnableOAuth2Sso)
and also configuring the client properties (spring.oauth2.client.*).
The spring.oauth2.sso.* are only needed to change the path for the
login (defaults to /login) - any other security configuration for the
protected resources can be added in a WebSecurityConfigurerAdapter
which carries the @EnableOAuth2Sso annotation.
2015-05-26 07:23:26 +01:00
Greg Turnquist
53f67a448f Auto-configure Spring Security OAuth2 when detected on the classpath
* Automatically spin up Authorization Server and Resource Server
* Automatically configures method level security included OAuth2Expression handler
* Wrote extensive unit tests verifying default behavior as well as the auto-configuration backing off when custom Authorization/Resource servers are included
* Created org.springframework.boot.security.oauth2 subpackage to contain it
* Can also disable either resource of authorization server completely with a single property for each
* Print out the auto-generated secrets and other settings
* Added spring-boot-sample-secure-oauth2 to provide a sample that can be run and poked with curl as well as some automated tests.
* Make users ask for which servers to install by adding @Enable*
* User has to @EnableGlobalMethodSecurity instead of using properties files

Add Spring Security OAuth2 support to Spring Boot CLI

* Triggered from either @EnableAuthorizationServer or @EnableResourceServer
* Needs to have @EnableGlobalMethodSecurity to allow picking the annotation model.
* By default, comes with import support for @PreAuthorize, @PreFilter, @PostAuthorize, and @PostFilter via a single start import
* Also need import support for the enable annotations mentioned above.
* Added extra test case and sample (oauth2.groovy)
2015-05-26 06:34:43 +01:00
Andy Wilkinson
ee7c86a07d Start building against Reactor 2.0.1 snapshots
See gh-2719
2015-04-27 13:47:42 +01:00
Stephane Nicoll
8ed461947f Improve RabbitMQ support in CLI
This commit deprecates the proprietary EnableRabbitMessaging annotation
in favour of the standard @EnableRabbit introduced as of Spring Rabbit
1.4.

Fixes gh-1494
2014-09-05 17:52:20 +02:00
Stephane Nicoll
85c95744f9 Avoid duplicate script
This commit avoids a script duplication: the integration test runs the
sample instead of a copy of it in the repro directory.

Also switched the sample from ActiveMQ to HornetQ as #323 revealed
some locking on CI. Hopefully that should fix it as HornetQ is non
persistent and can be embedded several times in the same VM.

Fixes gh-1456
2014-08-29 10:26:29 +02:00
Phillip Webb
f8a4df0838 Polish 2014-08-28 12:07:44 -07:00
Stephane Nicoll
affb202e74 Improve JMS support in cli
This commit deprecates the proprietary EnableJmsMessaging annotation in
favour of the standard @EnableJms introduced as of Spring 4.1. This
commit also updates the sample and adds an integration test as the
feature was actually broken.

Fixes gh-1456
2014-08-28 14:25:14 +02:00
Phillip Webb
f8bf0e2031 Polish 2014-07-28 15:40:40 -07:00
Dave Syer
5e3cc95ccf Adjust security.basic.enabled=false behaviour
Actually the web-secure sample is misusing
security.basic.enabled=false (IMO) - it should be a flag
to say that you want to temporarily disable the basic security
fallback on application endpoins, not  way to disable all
security autoconfiguration.

Added test case to web-secure sample to ensure a user
can log in.

Fixes gh-979
2014-05-29 13:25:01 +01:00
Phillip Webb
8bcda1bcbe Polish 2014-05-20 18:26:56 +01:00
Dave Syer
334c8142c4 Enhance Groovy template support in CLI
to allow user to specify the TemplateEngine

Fixes gh-908
2014-05-20 12:36:32 +01:00
Gary Russell
9fc9523ce3 CLI Integration Sample Shutdown
Fixes gh-761

Also add some sugar to the println so that it stands
out a little against the logging.
2014-05-02 11:17:19 +01:00
Artem Bilan
ce3aafa7a9 Upgrade to Spring Integration 4.0
Closes #751
2014-05-01 10:07:17 +01:00
Dave Syer
f46d281b22 Upgrade to Reactor 1.1
Fixes gh-706
2014-04-30 11:27:29 +01:00
Phillip Webb
51b0451ada Fix broken test due to random port change 2014-04-23 20:10:30 +01:00
Phillip Webb
2d8f66e3c5 Add more JMS sample log output 2014-02-06 15:30:32 -08:00
Phillip Webb
1bcd3de7b5 Polish 2014-01-02 12:10:37 -08:00
Dave Syer
4cfc7b6ad9 Make sure integration still works in CLI 2013-12-30 11:19:52 +00:00
Dave Syer
5d8e58d12c Remove support for Integration DSL (milestone only) 2013-12-30 07:39:36 +00:00
Dave Syer
75af18df7d Add support for beans{} in CLI scripts
User can add (a single) beans{} DSL declaration (see GroovyBeanDefinitionReader
in Spring 4 for more detail) anywhere at the top level of an application source
file. It will be compiled to a closure and fed in to the application context
through a GroovyBeanDefinitionReader. Cool!

The example spring-boot-cli/samples/beans.groovy runs in an integration test
and passes (see SampleIntegrationTests).
2013-12-19 17:11:01 +00:00
Dave Syer
e2c962ac28 Switch to thymeleaf-spring4 2013-12-19 13:40:24 +00:00
Andy Wilkinson
b0c5d3254a Make "." be the CLI's default classpath
Previously, the default classpath was empty. Now, in the absence of the
user providing a classpath via the -cp option, the default classpath
will be ".". If the user does specify a classpath, the classpath that's
used will be exactly what they have specified, i.e. "." will no longer
be on the classpath unless specified by the user.

The app sample integration test has been updated to verify that "." is
only the classpath by default.

Fixes #115
2013-12-04 11:13:49 +00:00
Dave Syer
0c1aa1942e Add tests for loading dependencies in starters without parent 2013-11-07 16:05:01 +00:00
Phillip Webb
b19f6bb238 Isolate class loading for launched CLI apps
Rework classloading for launched applications so that CLI classes and
dependencies are not visible. This change allows many of the previous
hacks and workarounds to be removed.

With the exception of the 'org.springframework.boot.groovy' package
and 'groovy-all' all user required depndencies are now pulled in
via @Grab annotations.

The updated classloading algorithm has enabled the following changes:

- AetherGrapeEngine is now back in the cli project and the
  spring-boot-cli-grape project has been removed. The AetherGrapeEngine
  has also been simplified.

- The TestCommand now launches a TestRunner (similar in design to the
  SpringApplicationRunner) and report test failures directly using
  the junit TextListener. Adding custom 'testers' source to the users
  project is no longer required. The previous 'double compile' for
  tests has also been removed.

- Utility classes have been removed in favor of using versions from
  spring-core.

- The CLI jar is now packaged using the 'boot-loader' rather than using
  the maven shade plugin.

This commit also applied minor polish refactoring to a number of
classes.
2013-11-04 23:19:46 -08:00
Phillip Webb
d7ae8cafbf Move tests from 'samples' to 'test-samples' 2013-11-04 22:21:37 -08:00
Phillip Webb
bec1c8f00f Polish 2013-11-04 22:17:38 -08:00
Greg Turnquist
cc92ba1a5c Fix spring test to properly handle failures
Failing test cases weren't not properly handled and instead caused
test to break. Added a test case and verified it works for both JUnit
and Spock.
2013-11-04 10:09:48 +00:00
Andy Wilkinson
97f93bfa64 Support simple @Grab annotations everywhere
Previously, simple @Grab annotations only worked on classes. This commit
updates the simple @Grab support so that they can be used on anything
that can be annotated with @Grab.

The simplified @Grab support relies upon springcli.properties having
been generated. This commit adds an M2E lifecycle mapping for the
antrun plugin so that springcli.properties is generated as part of an
Eclipse build, thereby making it easier to run tests in Eclipse that
rely upon the simplified @Grab support.
2013-10-10 16:57:13 +01:00
Dave Syer
3adfdd34ec Use simplified @Grab where possible 2013-10-09 10:16:01 -04:00
Roy Clarkson
5cdaa43912 Add Spring Mobile Device Resolver autoconfiguration 2013-10-08 17:43:09 -04:00
Dave Syer
b5f0f97110 Clean up TestCommand paraphenalia 2013-10-08 15:39:37 -04:00
Andy Wilkinson
c1ec5e5c0e Support @Grab without a version or group
Usually, use of @Grab requires you to specify a group, module, and
version when identifying a dependency. This can be done in two
different ways:

@Grab(group='alpha', module='bravo', version='1.0.0')
@Grab('alpha:bravo:1.0.0')

This commit allows users to only specify a module: the group is
inferred and the version is the one dictated by the boot CLI. Both
forms are supported:

@Grab(module='bravo')
@Grab('bravo')

Groovy's global AST transformations, which is how Grab is implemented,
do not support ordering and we need to augment the AST for the Grab
annotation before its processed by the Grab AST transformation. To
work around this, reflection is used to get hold of the compile
operations in the conversion phase, and a new AST transformation is
inserted immediately before the first AST transformation operation.

To allow a module's groupId and version to be resolved consistently,
META-INF/springcli.properties has been enhanced to include properties
for each module that we want to support in the following form:

<module>.groudId = <groudId>
<module>.version = <version>

<groupId> and <version> are taken from the Maven project's
dependencies and VPP, a Velocity-based pre-processor, is used to
automatically generate the enhanced properties file.

To prevent pollution of spring-boot-cli's class path with the
dependencies that are only required to populate springcli.properties,
a separate project, spring-boot-cli-properties, has been created.
spring-boot-cli depends upon this now project causing it to, via the
shade plug, include the properties file in its jar.

Previously DependencyCustomizer allow a dependency to be added by
specifying its full coordinates, i.e. a group ID, artifact ID, and
version. This commit updates DependencyCustomizer to only require
an artifact/module ID. The group ID and version are then resolved
using the same mechanism as the enhanced @Grab support.

[#56328644] [bs-312] Allow @Grab without version
2013-10-08 10:41:35 +01:00
Greg Turnquist
941d163709 Add support for Spring Rabbit (via Spring AMQP) to Boot
- If RabbitTemplate is on the classpath, turn on autodetection.
- Create a RabbitTemplate, a Rabbit ConnectionFactory, and a RabbitAdmin is spring.rabbitmq.dynamic:true
- Enable some **spring.rabbitmq** properties like host, port, username, password, and dynamic
- Add tests to verify functionality
- Add Groovy CLI functionality. Base it on @EnableRabbitMessaging. Add spring-amqp to the path.
- Create rabbit.groovy test to prove it all works.
- Make Queue and TopicExchange top-level Spring beans in rabbit.groovy test script
2013-09-26 12:14:06 -04:00
Greg Turnquist
fa6e6fde6c Add JMS autoconfig support
* application.properties support for spring.jms and spring.activemq

* more tests to verify ActiveMQConnectionFactory pooling

* Groovy support and simple sample with activemq

* Groovy detection mechanism is @EnableJmsMessaging annotation
2013-09-26 11:53:06 -04:00
Greg Turnquist
97af88a8d8 Switch activemq to version 5.4.0 to avoid slf4j issue 2013-09-20 15:38:59 +01:00
Phillip Webb
b857a9001d Cleanup trailing whitespace 2013-09-18 12:17:56 -07:00
Greg Turnquist
5801e422cf [BS-48] Add autoconfigured JMS support
* Add ability to detect spring-jms on the path and create a JmsTemplate with
  ActiveMQConnectionFactory
* Create tests showing autoconfigured JmsTemplate with ActiveMQ, but prove it
  backs off if a separate ConnectionFactory exists.
* Add support to spring-boot-cli to that it detects JmsTemplate, DefaultMessageListenerContainer,
  or SimpleMessageListenerContainer, and turns on autoconfiguration as well as
  add proper @Grab's and import statements.
* Write a jms.groovy test showing proper CLI support

Simplify ActiveMQ configuration

Update ActiveMQ to 5.7.0
2013-09-18 17:52:14 +01:00
Dave Syer
621ecd3901 Added JDBC and @Transactional support to Groovy CLI
* @EnableTransactionManagement triggers spring-tx imports
* Field or method of type JdbcTemplate or NamedParameterJdbcTemplate
  of DataSource triggers spring-jdbc imports
2013-09-13 08:02:56 -07:00
Dave Syer
5fa0166dea Upgrade to Reactor 1.0.0.M2 2013-09-05 17:14:17 -07:00
Dave Syer
b720f7e688 Startup time for CLI app much quicker now
The Boot resolver didn't transfer enough of the settings
of the default ChainResolver. Adding a boolean flag was
enough to make the chatter die down for dependencies
that were unneeded.

[Fixes #55358344] [bs-291]
2013-09-05 17:14:08 -07:00
Phillip Webb
4c067a89fe Ops -> Actuator 2013-07-31 12:57:25 -07:00
Dave Syer
ec3c5b5321 Add auto compile tweaks for reactor 2013-07-31 09:21:16 +01:00
Phillip Webb
3bb79db579 Renamed spring-boot-ups -> spring-boot-starter 2013-07-31 01:11:10 -07:00
Dave Syer
2098e23fca Change package names zero->boot
* actuator -> boot-ops
* cli -> boot-cli
* launcher -> boot-load
* autoconfig -> boot-config
* bootstrap -> boot-strap
* starters -> boot-up

[#54095231] [bs-253] Refactor Zero->Boot
2013-07-26 14:13:41 +01:00