全局更新

This commit is contained in:
hukekuan@163.com 2017-05-10 18:21:49 +08:00
parent e70294797d
commit b6a8f049ec
2 changed files with 3 additions and 22 deletions

View File

@ -93,7 +93,7 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.4.1212.jre7</version>
<version>42.1.0</version>
</dependency>
<dependency>
<groupId>com.oracle</groupId>

View File

@ -24,26 +24,7 @@ public class App {
public static void main(String[] args) throws IOException {
ApplicationContext context =ContextInit();
// HelloService obj = (HelloService) context.getBean("helloService");
// System.out.println(obj.SayHello());
// display a data store file chooser dialog for shapefiles
File file = JFileDataStoreChooser.showOpenFile("shp", null);
if (file == null) {
return;
}
FileDataStore store = FileDataStoreFinder.getDataStore(file);
SimpleFeatureSource featureSource = store.getFeatureSource();
// Create a map content and add our shapefile to it
MapContent map = new MapContent();
map.setTitle("Quickstart");
Style style = SLD.createSimpleStyle(featureSource.getSchema());
Layer layer = new FeatureLayer(featureSource, style);
map.addLayer(layer);
// Now display the map
JMapFrame.showMap(map);
HelloService obj = (HelloService) context.getBean("helloService");
System.out.println(obj.SayHello());
}
}