File tree Expand file tree Collapse file tree 3 files changed +8
-14
lines changed
src/main/java/com/ctrip/framework/apollo/demo/spring Expand file tree Collapse file tree 3 files changed +8
-14
lines changed Original file line number Diff line number Diff line change 11
11
<name >Apollo Demo</name >
12
12
<packaging >jar</packaging >
13
13
<properties >
14
+ <java .version>1.7</java .version>
14
15
<github .path>${project.artifactId} </github .path>
15
16
<!-- apollo spring integration requires Spring 3.1.1+ -->
16
17
<spring-demo .version>3.1.1.RELEASE</spring-demo .version>
Original file line number Diff line number Diff line change 2
2
3
3
import org .springframework .context .annotation .AnnotationConfigApplicationContext ;
4
4
5
- import java .io . IOException ;
5
+ import java .util . Scanner ;
6
6
7
7
/**
8
8
* @author Jason Song(song_s@ctrip.com)
@@ -12,12 +12,9 @@ public static void main(String[] args) {
12
12
new AnnotationConfigApplicationContext (AnnotationApplication .class .getPackage ().getName ());
13
13
onKeyExit ();
14
14
}
15
+
15
16
private static void onKeyExit () {
16
- System .out .println ("Press any key to exit..." );
17
- try {
18
- System .in .read ();
19
- } catch (IOException e ) {
20
- e .printStackTrace ();
21
- }
17
+ System .out .println ("Press Enter to exit..." );
18
+ new Scanner (System .in ).nextLine ();
22
19
}
23
20
}
Original file line number Diff line number Diff line change 2
2
3
3
import org .springframework .context .support .ClassPathXmlApplicationContext ;
4
4
5
- import java .io . IOException ;
5
+ import java .util . Scanner ;
6
6
7
7
/**
8
8
* @author Jason Song(song_s@ctrip.com)
@@ -14,11 +14,7 @@ public static void main(String[] args) {
14
14
}
15
15
16
16
private static void onKeyExit () {
17
- System .out .println ("Press any key to exit..." );
18
- try {
19
- System .in .read ();
20
- } catch (IOException e ) {
21
- e .printStackTrace ();
22
- }
17
+ System .out .println ("Press Enter to exit..." );
18
+ new Scanner (System .in ).nextLine ();
23
19
}
24
20
}
You can’t perform that action at this time.
0 commit comments