Janne Valkealahti
7298b2ce78
Support for non-interactive shell commands
...
- Add support for running shell commands as a non-interactive mode.
- This works by adding new ShellApplicationRunner interface which is
an extension to ApplicationRunner forcing to have exactly one main
ApplicationRunner and then DefaultApplicationRunner dispatches to
new interface ShellRunner which allows to pick between script,
interactive and non-interactive, etc.
- It is sort of a breaking change but works much better not having
a need to have previous hooks between application runners to disable
things at runtime.
- All this makes it closer for a user to have a choice between
using shell commands as is without entering interactive mode.
- Also add SpringShellProperties for better config props support
for boot users.
- Fixes #342
2021-12-31 15:30:52 +00:00
Janne Valkealahti
d578f28662
Polish
2021-12-24 13:54:41 +00:00
Janne Valkealahti
f6394a4531
Rework bean handling
...
- Lot of rework to move better model to work around bean cycles
- Remove use of @Lazy
- Move StandardAPIAutoConfiguration to autoconfig package
- Remove some of a direct ObjectProvider use in constructors
- Adds spring-native support with most of a things working out of a box
- Relates #324
- Relates #329
- Relates #323
2021-12-24 08:50:40 +00:00
Janne Valkealahti
d883e0e660
Introduce ResultHandlerService
...
- Replace main use of ResultHandler with ResultHandlerService which is
a framework type of impl for handlers found from conversion service.
This handles types better and easier to handle with bean cycles, etc.
- Removed IterableResultHandler to think about these use cases later
when further refactoring is done.
- TypeHierarchyResultHandler is removed and better functionality now
via ResultHandlerService.
- Relates #336
2021-12-21 18:11:13 +00:00
Janne Valkealahti
5dcdc4c185
Extract autoconfig
...
- Create separate spring-shell-autoconfigure and keep
all autoconfig features there.
- Fixes #329
2021-12-19 12:38:41 +00:00
Janne Valkealahti
f20b71a8c2
Remove unused Parser usage
2021-12-18 16:17:10 +00:00
Janne Valkealahti
ffbd88b860
Update jline 3.21.0
...
- Fixes #331
2021-12-18 13:38:45 +00:00
汪吉
763fef8e1b
remove not use import and add Override and add a miss @Component
2021-12-18 12:46:52 +00:00
Janne Valkealahti
e14f4a3f32
Remove bean cycles
...
- Shuffle things around into different auto-config and configuration
classes and use other tricks like ObjectProvider to work around
boot 2.6.x imposing bean cycle checks.
- This is first set of changes to work around this issue, not
to make things perfect. Further refactoring work is needed
making code base more boot 2.x friendly as things are based
on boot 1.5.x times.
- Fixes #324
2021-12-17 15:32:52 +00:00
Janne Valkealahti
90216bdc32
Switch from BUILD-SNAPSHOT to SNAPSHOT
2021-12-17 14:25:52 +00:00
Janne Valkealahti
5e61ff1315
Polish unused imports
2021-12-11 13:09:00 +00:00
Janne Valkealahti
e30edf2446
Update boot 2.6.1
...
- Migrate tests to junit5 and assertj as those
are on a classpath automatically.
- Temporarily use spring.main.allow-circular-references=true
to allow time for fixes to remove cycles.
2021-12-11 12:57:34 +00:00
Spring Operator
23d99f45eb
URL Cleanup
...
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).
# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.
* http://jcommander.org/apidocs/ (200) with 1 occurrences could not be migrated:
([https](https://jcommander.org/apidocs/ ) result SSLHandshakeException).
# Fixed URLs
## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.
* http://docs.spring.io/spring-framework/docs/current/javadoc-api/ with 1 occurrences migrated to:
https://docs.spring.io/spring-framework/docs/current/javadoc-api/ ([https](https://docs.spring.io/spring-framework/docs/current/javadoc-api/ ) result 200).
* http://maven.apache.org/xsd/assembly-2.0.0.xsd with 1 occurrences migrated to:
https://maven.apache.org/xsd/assembly-2.0.0.xsd ([https](https://maven.apache.org/xsd/assembly-2.0.0.xsd ) result 200).
* http://maven.apache.org/xsd/maven-4.0.0.xsd with 12 occurrences migrated to:
https://maven.apache.org/xsd/maven-4.0.0.xsd ([https](https://maven.apache.org/xsd/maven-4.0.0.xsd ) result 200).
* http://repo.spring.io/libs-milestone-local with 2 occurrences migrated to:
https://repo.spring.io/libs-milestone-local ([https](https://repo.spring.io/libs-milestone-local ) result 302).
* http://repo.spring.io/libs-snapshot-local with 2 occurrences migrated to:
https://repo.spring.io/libs-snapshot-local ([https](https://repo.spring.io/libs-snapshot-local ) result 302).
* http://repo.spring.io/release with 1 occurrences migrated to:
https://repo.spring.io/release ([https](https://repo.spring.io/release ) result 302).
# Ignored
These URLs were intentionally ignored.
* http://maven.apache.org/ASSEMBLY/2.0.0 with 2 occurrences
* http://maven.apache.org/POM/4.0.0 with 24 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 13 occurrences
2019-03-26 11:55:46 +01:00
Spring Operator
2ccab80189
URL Cleanup
...
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).
# Fixed URLs
## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.
* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/ ) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 125 occurrences migrated to:
https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0 ) result 200).
2019-03-26 11:48:12 +01:00
Janne Valkealahti
4f0dc203af
Change to next major development version 3.0.0
2018-11-14 09:11:34 +00:00
Bharath Prakash
3f8e8334ba
This is an Obvious fix to correct the constant value
2018-05-21 04:29:19 -04:00
Spring Buildmaster
75b9c2c846
[artifactory-release] Next development version
2018-04-25 08:29:26 +00:00
Spring Buildmaster
f39c391342
[artifactory-release] Release version 2.0.1.RELEASE
2018-04-25 08:29:21 +00:00
Eric Bottard
d813888dc7
Allow TAB completion on an empty buffer
...
Fixes #210
2018-03-26 11:38:26 +02:00
Eric Bottard
a0b2eb005d
Implement command interruption via CTRL-C
...
Fixes #209
2018-03-14 23:25:06 +01:00
Eric Bottard
ea71c3821b
Fix capturing CTRL-C to exit the shell.
...
Fixes #195
2018-01-18 09:40:32 +01:00
Spring Buildmaster
ded7b756b1
[artifactory-release] Next development version
2018-01-16 09:01:03 +00:00
Spring Buildmaster
a6ecde1406
[artifactory-release] Release version 2.0.0.RELEASE
2018-01-16 09:00:58 +00:00
Eric Bottard
f90edd42c4
Make ResultHandlers configuration more explicit
...
Handle exit as a dedicated case (prevents eg 'exit' commands in scripts to make script quit)
Add an example of custom ApplicationRunner
Fixes #187
Fixes #183
Decouple ApplicationRunners
Make ThrowableResultHandler behave differently in non-interactive mode
2018-01-15 15:59:01 +01:00
Eric Bottard
6e6154a80a
Rename conversionService to something else to avoid
...
initialization cycle issue (Converters were not being wired, etc).
Fixes #180
2017-11-27 16:42:17 +01:00
Eric Bottard
e2c8be2b23
Use getMessage() by default when printing exceptions.
...
Fixes #176
2017-11-06 15:03:05 +01:00
Eric Bottard
7d50c0813f
Qualify the Spring Shell provided ConversionService
...
Fixes #173
2017-11-06 14:52:50 +01:00
Spring Buildmaster
e917d876e3
[artifactory-release] Next development version
2017-10-04 09:29:34 +00:00
Spring Buildmaster
1bea66cdb1
[artifactory-release] Release version 2.0.0.M2
2017-10-04 09:29:29 +00:00
Eric Bottard
32c65f2da7
Allow usage without Spring Boot AutoConfiguration
...
Fixes #166
2017-10-04 11:15:01 +02:00
Eric Bottard
f0e5c45ee9
Add automatic command grouping
...
Fixes #163
Introduce Command and Command.Help
2017-09-28 09:44:48 +02:00
Roland Weisleder
e4e6471f27
Add command group and group output of help command
...
Resolves #135
2017-09-23 15:36:11 +02:00
Eric Bottard
a50b741af1
Document PromptProvider, ApplicationRunner and ConversionService.
...
Make the default ConversionService register converters in the ctx
2017-09-19 13:57:28 +02:00
Eric Bottard
8fcc203fe6
Expose default runner precedence
2017-09-18 18:23:10 +02:00
Eric Bottard
33b56132de
Make the default ApplicationRunner reusable
2017-09-18 18:08:21 +02:00
Eric Bottard
fdc4eb0edd
Fix IterableResultHandler duplicate definition
...
Fixes #157
2017-09-18 11:42:56 +02:00
Eric Bottard
076a183d08
Protect against Exceptions in ResultHandler code
2017-09-17 20:59:27 +02:00
Eric Bottard
12dff36d8b
Fix completion in multi word commands
...
Fixes #150
2017-09-16 13:43:04 +02:00
Spring Buildmaster
425493e0a9
[artifactory-release] Next development version
2017-09-14 14:29:28 +00:00
Spring Buildmaster
ccd2444b1e
[artifactory-release] Release version 2.0.0.M1
2017-09-14 14:29:24 +00:00
Eric Bottard
4a6c699aca
Inject the ValidatorFactory instead of Validator.
...
This prevents the Spring Validator Factory from being injected (it
does not support the 1.1 methods)
2017-09-11 17:16:43 +02:00
Eric Bottard
8f3c11a3bd
Move logback configuration out of core
2017-09-11 16:54:53 +02:00
Eric Bottard
8fd4d69a61
Expose an evaluate() method that returns result before handling
...
Fixes #154
2017-09-08 21:48:31 +02:00
Eric Bottard
32c18bec75
Document bean validation constraints in help()
...
Fixes #147
2017-09-08 16:38:42 +02:00
Eric Bottard
6f872dc308
Change internal method name to avoid confusion with bean validation
2017-09-07 14:58:50 +02:00
Eric Bottard
919cefbc52
Document bean validation
2017-09-07 14:48:50 +02:00
Eric Bottard
3b0901af17
Pretty print bean validation errors
...
Fixes #137
2017-08-30 21:59:53 +02:00
Eric Bottard
73bf00bb44
Fix #142
2017-08-30 19:06:26 +02:00
Eric Bottard
993f49a81f
Better handling of ResultHandler generics detection
2017-08-30 18:20:43 +02:00
Eric Bottard
9f88c03cf3
Add ability to run commands and exit
2017-08-30 16:54:36 +02:00