Because the database used in the project is MySQL, GeoServer also needs to use the MySQL data source in order to ensure data synchronization.
(The GIS service engine also goes to GeoServer because ArcGIS does not support MySQL)
GeoServer's Open source nature, decided that he will inevitably have bugs, fortunately there is source code, repair is not trouble.
BUG 1:
The configured Layer data space field cannot have a null value, otherwise it throws an error that the boundary range cannot be evaluated. Causes the layer to be completely unusable.
Solution:
Increase the default Value property on the table layer's spatial field.
The view requires an increase in function conversions such as:
Create VIEW v_points as SELECT coalesce (Pt. Geom,st_geomfromtext (' point (0 0) ', 4326)) as GEOM from POINTS
BUG 2:
Page search is not the same, WFS query geoserver original startindex,maxfeatures page search is really useful. However, in the MySQL plug-in, there will be data query results inconsistent or simply 0 results.
The root cause is that when you do SQL mapping, the filter where condition is not written to the query statement. The modification method is also very simple, find Gt-jdbc-mysql-version.jar, modify the Mysqlfiltertosql.java source file. It is estimated that the original author's negligence. Only spatial query filtering was added, and general DBMS SQL filtering was ignored.
Caps.addall (sqldialect.base_dbms_capabilities)
@Override protected filtercapabilities createfiltercapabilities () { //mysql does not actually implement all of the special functions Filtercapabilities caps = super.createfiltercapabilities (); caps.addall (sqldialect.base_dbms_capabilities); Caps.addtype (Bbox.class); caps.addtype (Contains.class); //caps.addtype (Crosses.class); caps.addtype (Disjoint.class); caps.addtype ( Equals.class); caps.addtype (Intersects.class); caps.addType (Overlaps.class); caps.addtype (Touches.class); caps.addtype (Within.class); caps.addtype (Beyond.class); return caps; }
BUG 3:
The polygon search result becomes a rectangular search. Cause polygon Search to be a misnomer.
Solution:
This should belong to MySQL itself. It is said that the new version has been repaired and remains to be verified
GeoServer considerations for using MySQL data sources