全局更新
This commit is contained in:
parent
e70294797d
commit
b6a8f049ec
2
pom.xml
2
pom.xml
@ -93,7 +93,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.postgresql</groupId>
|
<groupId>org.postgresql</groupId>
|
||||||
<artifactId>postgresql</artifactId>
|
<artifactId>postgresql</artifactId>
|
||||||
<version>9.4.1212.jre7</version>
|
<version>42.1.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.oracle</groupId>
|
<groupId>com.oracle</groupId>
|
||||||
|
|||||||
@ -24,26 +24,7 @@ public class App {
|
|||||||
|
|
||||||
public static void main(String[] args) throws IOException {
|
public static void main(String[] args) throws IOException {
|
||||||
ApplicationContext context =ContextInit();
|
ApplicationContext context =ContextInit();
|
||||||
// HelloService obj = (HelloService) context.getBean("helloService");
|
HelloService obj = (HelloService) context.getBean("helloService");
|
||||||
// System.out.println(obj.SayHello());
|
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user