mirror of
https://gitee.com/dcren/initializr.git
synced 2025-05-06 13:48:03 +08:00
Updates bootstrap->zero
This commit is contained in:
parent
8cd59a97ab
commit
a7433b094c
13
app.groovy
13
app.groovy
@ -1,5 +1,5 @@
|
||||
@Grab("org.springframework.bootstrap:spring-bootstrap-actuator:0.5.0.BUILD-SNAPSHOT")
|
||||
@Grab("org.codehaus.groovy:groovy-ant:2.1.3")
|
||||
@Grab("org.springframework.zero:spring-actuator:0.5.0.BUILD-SNAPSHOT")
|
||||
@Grab("org.codehaus.groovy:groovy-ant:2.1.6")
|
||||
@Grab("org.codehaus.groovy.modules.http-builder:http-builder:0.5.2")
|
||||
@Grab(group='net.sf.json-lib', module='json-lib', version='2.3', classifier='jdk15')
|
||||
import groovyx.net.http.*
|
||||
@ -107,17 +107,18 @@ class MainController {
|
||||
|
||||
}
|
||||
|
||||
@Grab("org.springframework.security:spring-security-javaconfig:1.0.0.CI-SNAPSHOT")
|
||||
@Grab("org.springframework.security:spring-security-config:3.2.0.M2")
|
||||
@Grab(value="org.springframework.security:spring-security-web:3.2.0.M2", transitive=false)
|
||||
import org.springframework.security.config.annotation.web.*
|
||||
import org.springframework.security.authentication.*
|
||||
import org.springframework.security.core.Authentication
|
||||
import org.springframework.security.core.authority.AuthorityUtils
|
||||
import org.springframework.bootstrap.actuate.properties.SecurityProperties
|
||||
import org.springframework.actuate.properties.SecurityProperties
|
||||
@Configuration
|
||||
@Log
|
||||
class SecurityConfiguration {
|
||||
|
||||
@Bean(name = "org.springframework.bootstrap.actuate.properties.SecurityProperties")
|
||||
@Bean(name = "org.springframework.actuate.properties.SecurityProperties")
|
||||
SecurityProperties securityProperties() {
|
||||
SecurityProperties security = new SecurityProperties()
|
||||
security.getBasic().setPath("/gs/**")
|
||||
@ -141,7 +142,7 @@ class PomRequest {
|
||||
def style = []
|
||||
|
||||
String name = "demo"
|
||||
String description = "Demo project for Spring Bootstrap"
|
||||
String description = "Demo project for Spring Zero"
|
||||
String groupId = "org.test"
|
||||
String artifactId
|
||||
String version = "0.0.1.SNAPSHOT"
|
||||
|
22
logback.xml
Normal file
22
logback.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<property name="CONSOLE_LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } [%t] --- %-40.40logger{39} : %m%n%wex"/>
|
||||
|
||||
<conversionRule conversionWord="wex" converterClass="org.springframework.bootstrap.logging.logback.WhitespaceThrowableProxyConverter" />
|
||||
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="CONSOLE" />
|
||||
</root>
|
||||
|
||||
<logger name="org.springframework.zero" level="DEBUG"/>
|
||||
<logger name="org.springframework.security" level="DEBUG"/>
|
||||
<logger name="sun.net.www.protocol.http.HttpURLConnection" level="TRACE"/>
|
||||
|
||||
|
||||
</configuration>
|
@ -1,8 +0,0 @@
|
||||
handlers = java.util.logging.ConsoleHandler
|
||||
.level = INFO
|
||||
|
||||
java.util.logging.ConsoleHandler.level = FINE
|
||||
sun.net.www.protocol.http.HttpURLConnection.level = ALL
|
||||
#org.apache.http.level = ALL
|
||||
#groovyx.net.http.level = ALL
|
||||
org.springframework.bootstrap = ALL
|
@ -1,8 +1,9 @@
|
||||
---
|
||||
applications:
|
||||
- name: spring
|
||||
- name: initializr
|
||||
memory: 1024M
|
||||
instances: 1
|
||||
url: spring.cfapps.io
|
||||
url: initializr.cfapps.io
|
||||
path: .
|
||||
command: JAVA_OPTS=-Djava.util.logging.config.file=logging.properties cp cacerts .jdk/lib/security && ./spring/bin/spring run --local app.groovy -- --server.port=$PORT
|
||||
command: java -jar ./spring/lib/*.jar run --local app.groovy -- --server.port=$PORT
|
||||
buildpack: https://github.com/cloudfoundry/cloudfoundry-buildpack-java
|
||||
|
@ -11,15 +11,15 @@
|
||||
<description>${description}</description>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.bootstrap</groupId>
|
||||
<artifactId>spring-bootstrap-starters</artifactId>
|
||||
<groupId>org.springframework.zero</groupId>
|
||||
<artifactId>spring-starter-parent</artifactId>
|
||||
<version>0.5.0.BUILD-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies><% styles.each { %>
|
||||
<dependency>
|
||||
<groupId>org.springframework.bootstrap</groupId>
|
||||
<artifactId>spring-bootstrap-${it}starter</artifactId>
|
||||
<groupId>org.springframework.zero</groupId>
|
||||
<artifactId>spring-starter-${it}</artifactId>
|
||||
</dependency><% } %>
|
||||
</dependencies>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user