add history file name example

This commit is contained in:
Jarred Li
2012-04-11 06:03:03 -07:00
parent e6e201e390
commit 956d72ee28
6 changed files with 45 additions and 20 deletions

View File

@@ -1,12 +0,0 @@
package org.springframework.shell.samples.helloworld;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
@ComponentScan({"org.springframework.shell.samples.helloworld.commands"})
public class HelloWorldPlugin {
}

View File

@@ -0,0 +1,38 @@
/*
* Copyright 2011-2012 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.shell.samples.helloworld.commands;
import org.springframework.shell.plugin.HistoryFileProvider;
import org.springframework.stereotype.Component;
/**
*
* @author Jarred Li
*
*/
@Component
public class MyHistoryFileProvider implements HistoryFileProvider {
public int getOrder() {
return 1;
}
public String getHistoryFileName() {
return "my.log";
}
}