Commit b5d267ca authored by Phillip Webb's avatar Phillip Webb

Polish

parent 80b7e60c
...@@ -105,7 +105,6 @@ public class EndpointWebMvcChildContextConfiguration { ...@@ -105,7 +105,6 @@ public class EndpointWebMvcChildContextConfiguration {
@Bean @Bean
public HandlerAdapter handlerAdapter(HttpMessageConverters converters) { public HandlerAdapter handlerAdapter(HttpMessageConverters converters) {
// TODO: maybe this needs more configuration for non-basic response use cases
RequestMappingHandlerAdapter adapter = new RequestMappingHandlerAdapter(); RequestMappingHandlerAdapter adapter = new RequestMappingHandlerAdapter();
adapter.setMessageConverters(converters.getConverters()); adapter.setMessageConverters(converters.getConverters());
return adapter; return adapter;
......
...@@ -34,6 +34,7 @@ import org.springframework.util.StringUtils; ...@@ -34,6 +34,7 @@ import org.springframework.util.StringUtils;
* *
* @author Dave Syer * @author Dave Syer
* @author Christian Dupuis * @author Christian Dupuis
* @since 1.1.0
*/ */
public class DataSourceHealthIndicator extends AbstractHealthIndicator { public class DataSourceHealthIndicator extends AbstractHealthIndicator {
......
/* /*
* Copyright 2012-2013 the original author or authors. * Copyright 2012-2014 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -24,12 +24,14 @@ import java.util.Map; ...@@ -24,12 +24,14 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.View;
import org.springframework.web.servlet.support.RequestContext; import org.springframework.web.servlet.support.RequestContext;
import org.springframework.web.servlet.view.AbstractUrlBasedView; import org.springframework.web.servlet.view.AbstractUrlBasedView;
/** /**
* @author Dave Syer * Spring MVC {@link View} that can render Groovy templates.
* *
* @author Dave Syer
* @since 1.1.0 * @since 1.1.0
*/ */
public class GroovyTemplateView extends AbstractUrlBasedView { public class GroovyTemplateView extends AbstractUrlBasedView {
......
/* /*
* Copyright 2012-2013 the original author or authors. * Copyright 2012-2014 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -25,11 +25,15 @@ import java.util.Locale; ...@@ -25,11 +25,15 @@ import java.util.Locale;
import org.springframework.beans.propertyeditors.LocaleEditor; import org.springframework.beans.propertyeditors.LocaleEditor;
import org.springframework.core.io.Resource; import org.springframework.core.io.Resource;
import org.springframework.web.servlet.View; import org.springframework.web.servlet.View;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.view.UrlBasedViewResolver; import org.springframework.web.servlet.view.UrlBasedViewResolver;
/** /**
* Spring MVC {@link ViewResolver} for {@link GroovyTemplateView}s.
*
* @author Dave Syer * @author Dave Syer
* @since 1.1.0 * @since 1.1.0
* @see GroovyTemplateView
*/ */
public class GroovyTemplateViewResolver extends UrlBasedViewResolver { public class GroovyTemplateViewResolver extends UrlBasedViewResolver {
......
...@@ -112,4 +112,5 @@ public class JacksonAutoConfiguration { ...@@ -112,4 +112,5 @@ public class JacksonAutoConfiguration {
} }
} }
} }
...@@ -46,6 +46,7 @@ import com.mongodb.Mongo; ...@@ -46,6 +46,7 @@ import com.mongodb.Mongo;
* @author Dave Syer * @author Dave Syer
* @author Oliver Gierke * @author Oliver Gierke
* @author Josh Long * @author Josh Long
* @since 1.1.0
*/ */
@Configuration @Configuration
@ConditionalOnClass({ Mongo.class, MongoTemplate.class }) @ConditionalOnClass({ Mongo.class, MongoTemplate.class })
......
...@@ -27,8 +27,8 @@ import org.springframework.social.connect.ConnectionFactory; ...@@ -27,8 +27,8 @@ import org.springframework.social.connect.ConnectionFactory;
/** /**
* Base class for auto-configured {@link SocialConfigurerAdapter}s. * Base class for auto-configured {@link SocialConfigurerAdapter}s.
* *
* @author Phillip Webb
* @author Craig Walls * @author Craig Walls
* @author Phillip Webb
* @since 1.1.0 * @since 1.1.0
*/ */
@ConditionalOnClass(SocialConfigurerAdapter.class) @ConditionalOnClass(SocialConfigurerAdapter.class)
......
...@@ -27,6 +27,7 @@ import org.springframework.util.StringUtils; ...@@ -27,6 +27,7 @@ import org.springframework.util.StringUtils;
* Provides access to the java binary executable, regardless of OS. * Provides access to the java binary executable, regardless of OS.
* *
* @author Phillip Webb * @author Phillip Webb
* @since 1.1.0
*/ */
public class JavaExecutable { public class JavaExecutable {
...@@ -47,7 +48,11 @@ public class JavaExecutable { ...@@ -47,7 +48,11 @@ public class JavaExecutable {
return command; return command;
} }
// TODO: is this used? /**
* Create a new {@link ProcessBuilder} that will run with the Java executable.
* @param arguments the command arguments
* @return a {@link ProcessBuilder}
*/
public ProcessBuilder processBuilder(String... arguments) { public ProcessBuilder processBuilder(String... arguments) {
ProcessBuilder processBuilder = new ProcessBuilder(toString()); ProcessBuilder processBuilder = new ProcessBuilder(toString());
processBuilder.command().addAll(Arrays.asList(arguments)); processBuilder.command().addAll(Arrays.asList(arguments));
......
/* /*
* Copyright 2012-2013 the original author or authors. * Copyright 2012-2014 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -24,9 +24,12 @@ import org.springframework.util.ClassUtils; ...@@ -24,9 +24,12 @@ import org.springframework.util.ClassUtils;
import ch.qos.logback.classic.Level; import ch.qos.logback.classic.Level;
/** /**
* Utility to initialize logback (when present) to use INFO level logging.
*
* @author Dave Syer * @author Dave Syer
* @since 1.1.0
*/ */
public class LogbackInitializer { public abstract class LogbackInitializer {
public static void initialize() { public static void initialize() {
if (ClassUtils.isPresent("org.slf4j.impl.StaticLoggerBinder", null) if (ClassUtils.isPresent("org.slf4j.impl.StaticLoggerBinder", null)
......
...@@ -26,10 +26,11 @@ import java.util.Collection; ...@@ -26,10 +26,11 @@ import java.util.Collection;
import org.springframework.util.ReflectionUtils; import org.springframework.util.ReflectionUtils;
/** /**
* Special utility used to run a process. * Utility used to run a process.
* *
* @author Phillip Webb * @author Phillip Webb
* @author Dave Syer * @author Dave Syer
* @since 1.1.0
*/ */
public class RunProcess { public class RunProcess {
......
/* /*
* Copyright 2012-2013 the original author or authors. * Copyright 2012-2014 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -20,13 +20,20 @@ import sun.misc.Signal; ...@@ -20,13 +20,20 @@ import sun.misc.Signal;
import sun.misc.SignalHandler; import sun.misc.SignalHandler;
/** /**
* Utilities for working with signal handling.
*
* @author Dave Syer * @author Dave Syer
* @since 1.1.0
*/ */
@SuppressWarnings("restriction") @SuppressWarnings("restriction")
public class SignalUtils { public class SignalUtils {
private static final Signal SIG_INT = new Signal("INT"); private static final Signal SIG_INT = new Signal("INT");
/**
* Handle {@literal INT} signals by calling the specified {@link Runnable}
* @param runnable the runnable to call on SIGINT.
*/
public static void attachSignalHandler(final Runnable runnable) { public static void attachSignalHandler(final Runnable runnable) {
Signal.handle(SIG_INT, new SignalHandler() { Signal.handle(SIG_INT, new SignalHandler() {
@Override @Override
......
...@@ -22,7 +22,7 @@ import java.net.URL; ...@@ -22,7 +22,7 @@ import java.net.URL;
* A strategy for detecting Java agents * A strategy for detecting Java agents
* *
* @author Andy Wilkinson * @author Andy Wilkinson
* @since 1.1 * @since 1.1.0
*/ */
public interface JavaAgentDetector { public interface JavaAgentDetector {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment