Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
5df52d3e
Commit
5df52d3e
authored
May 28, 2014
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
5d797ce0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
37 deletions
+36
-37
GroovyCompiler.java
...org/springframework/boot/cli/compiler/GroovyCompiler.java
+2
-3
SpringTestCompilerAutoConfiguration.java
...er/autoconfigure/SpringTestCompilerAutoConfiguration.java
+10
-16
using-spring-boot.adoc
spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc
+11
-6
SpringApplicationBuilder.java
...pringframework/boot/builder/SpringApplicationBuilder.java
+13
-12
No files found.
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/GroovyCompiler.java
View file @
5df52d3e
...
...
@@ -292,7 +292,7 @@ public class GroovyCompiler {
@SuppressWarnings
(
"unchecked"
)
private
static
ClassNode
getMainClass
(
CompilationUnit
source
)
{
return
getMainClass
(
(
List
<
ClassNode
>)
source
.
getAST
().
getClasses
());
return
getMainClass
(
source
.
getAST
().
getClasses
());
}
private
static
ClassNode
getMainClass
(
List
<
ClassNode
>
classes
)
{
...
...
@@ -305,8 +305,7 @@ public class GroovyCompiler {
return
node
;
}
}
return
classes
.
isEmpty
()
?
null
:
classes
.
get
(
0
);
return
(
classes
.
isEmpty
()
?
null
:
classes
.
get
(
0
));
}
}
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/SpringTestCompilerAutoConfiguration.java
View file @
5df52d3e
/*
* Copyright 2012-201
3
the original author or authors.
* Copyright 2012-201
4
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -34,9 +34,9 @@ import org.springframework.boot.cli.compiler.GroovyCompilerConfiguration;
* {@link CompilerAutoConfiguration} for Spring Test
*
* @author Dave Syer
* @since 1.1.0
*/
public
class
SpringTestCompilerAutoConfiguration
extends
CompilerAutoConfiguration
{
public
class
SpringTestCompilerAutoConfiguration
extends
CompilerAutoConfiguration
{
@Override
public
boolean
matches
(
ClassNode
classNode
)
{
...
...
@@ -46,28 +46,22 @@ public class SpringTestCompilerAutoConfiguration extends
@Override
public
void
apply
(
GroovyClassLoader
loader
,
GroovyCompilerConfiguration
configuration
,
GeneratorContext
generatorContext
,
SourceUnit
source
,
ClassNode
classNode
)
throws
CompilationFailedException
{
GroovyCompilerConfiguration
configuration
,
GeneratorContext
generatorContext
,
SourceUnit
source
,
ClassNode
classNode
)
throws
CompilationFailedException
{
if
(!
AstUtils
.
hasAtLeastOneAnnotation
(
classNode
,
"RunWith"
))
{
AnnotationNode
runwith
=
new
AnnotationNode
(
ClassHelper
.
make
(
"RunWith"
));
runwith
.
addMember
(
"value"
,
new
ClassExpression
(
ClassHelper
.
make
(
"SpringJUnit4ClassRunner"
)));
AnnotationNode
runwith
=
new
AnnotationNode
(
ClassHelper
.
make
(
"RunWith"
));
runwith
.
addMember
(
"value"
,
new
ClassExpression
(
ClassHelper
.
make
(
"SpringJUnit4ClassRunner"
)));
classNode
.
addAnnotation
(
runwith
);
}
}
@Override
public
void
applyImports
(
ImportCustomizer
imports
)
throws
CompilationFailedException
{
public
void
applyImports
(
ImportCustomizer
imports
)
throws
CompilationFailedException
{
imports
.
addStarImports
(
"org.junit.runner"
)
.
addStarImports
(
"org.springframework.boot.test"
)
.
addStarImports
(
"org.springframework.test.context.junit4"
)
.
addStarImports
(
"org.springframework.test.annotation"
)
.
addImports
(
"org.springframework.test.context.web.WebAppConfiguration"
);
.
addImports
(
"org.springframework.test.context.web.WebAppConfiguration"
);
}
}
spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc
View file @
5df52d3e
...
...
@@ -567,6 +567,8 @@ This allows you to attach a debugger to your packaged application:
-jar target/myproject-0.0.1-SNAPSHOT.jar
----
[[using-boot-running-with-the-maven-plugin]]
=== Using the Maven plugin
The Spring Boot Maven plugin includes a `run` goal which can be used to quickly compile
...
...
@@ -580,9 +582,10 @@ resources for instant ``hot'' reload.
Useful operating system environment variable:
```
$ export MAVEN_OPTS=-Xmx1024m -XX:MaxPermSize=128M -Djava.security.egd=file:/dev/./urandom
```
[indent=0,subs="attributes"]
----
$ export MAVEN_OPTS=-Xmx1024m -XX:MaxPermSize=128M -Djava.security.egd=file:/dev/./urandom
----
(The "egd" setting is to speed up Tomcat startup by giving it a faster source of entropy for session keys.)
...
...
@@ -599,9 +602,11 @@ the `spring-boot-plugin`
Useful operating system environment variable:
```
$ export JAVA_OPTS=-Xmx1024m -XX:MaxPermSize=128M -Djava.security.egd=file:/dev/./urandom
```
[indent=0,subs="attributes"]
----
$ export JAVA_OPTS=-Xmx1024m -XX:MaxPermSize=128M -Djava.security.egd=file:/dev/./urandom
----
[[using-boot-hot-swapping]]
...
...
spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java
View file @
5df52d3e
...
...
@@ -83,18 +83,19 @@ public class SpringApplicationBuilder {
this
.
application
=
createSpringApplication
(
sources
);
}
/**
* Creates a new {@link org.springframework.boot.SpringApplication} instances from the given sources. Subclasses may
* override in order to provide a custom subclass of {@link org.springframework.boot.SpringApplication}
*
* @param sources The sources
* @return The {@link org.springframework.boot.SpringApplication} instance
*/
protected
SpringApplication
createSpringApplication
(
Object
...
sources
)
{
return
new
SpringApplication
(
sources
);
}
/**
/**
* Creates a new {@link org.springframework.boot.SpringApplication} instances from the
* given sources. Subclasses may override in order to provide a custom subclass of
* {@link org.springframework.boot.SpringApplication}
* @param sources The sources
* @return The {@link org.springframework.boot.SpringApplication} instance
* @since 1.1.0
*/
protected
SpringApplication
createSpringApplication
(
Object
...
sources
)
{
return
new
SpringApplication
(
sources
);
}
/**
* Accessor for the current application context.
* @return the current application context (or null if not yet running)
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment