diff --git a/pom.xml b/pom.xml index 8052cab30..e97190777 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.gw geoweaver - 0.9.2 + 0.9.3 geoweaver A workflow management for hybrid AI experiments of various scales @@ -19,7 +19,7 @@ - 1.8 + [5.3.1,) diff --git a/src/main/java/com/gw/GeoweaverApplication.java b/src/main/java/com/gw/GeoweaverApplication.java index 0f45c0d7b..293d05fca 100644 --- a/src/main/java/com/gw/GeoweaverApplication.java +++ b/src/main/java/com/gw/GeoweaverApplication.java @@ -24,6 +24,7 @@ public static void main(String[] args) { } + public static void browse(String url) { if(Desktop.isDesktopSupported()){ Desktop desktop = Desktop.getDesktop(); diff --git a/src/main/java/com/gw/database/HostRepository.java b/src/main/java/com/gw/database/HostRepository.java index 5219e8b41..51a3ecf49 100644 --- a/src/main/java/com/gw/database/HostRepository.java +++ b/src/main/java/com/gw/database/HostRepository.java @@ -5,18 +5,19 @@ import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.query.Param; import com.gw.jpa.Host; public interface HostRepository extends CrudRepository{ - @Query(value="select * from hosts where owner = ?1 ", + @Query(value="select * from host where owner = ?1 ", nativeQuery = true) Collection findByOwner(String owner); - @Query(value="select * from hosts where name like '%?1%'", + @Query(value="select * from HOST where name like CONCAT('%',:keyword,'%')", nativeQuery = true) - Collection findHostsByNameAlike(String keyword); + Collection findHostsByNameAlike(@Param("keyword") String keyword); diff --git a/src/main/java/com/gw/database/ProcessRepository.java b/src/main/java/com/gw/database/ProcessRepository.java index 7ed4d74d0..a2cc64d0c 100644 --- a/src/main/java/com/gw/database/ProcessRepository.java +++ b/src/main/java/com/gw/database/ProcessRepository.java @@ -4,15 +4,16 @@ import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.query.Param; import com.gw.jpa.GWProcess; import com.gw.jpa.Host; public interface ProcessRepository extends CrudRepository{ - @Query(value = "select * from GWProcess where name like '%?1%'", + @Query(value = "select * from GWProcess where name like CONCAT('%',:keyword,'%')", nativeQuery = true) - Collection findProcessesByNameAlike(String keyword); + Collection findProcessesByNameAlike(@Param("keyword") String keyword); @Query(value="select * from gwprocess where description = 'python'", nativeQuery = true) diff --git a/src/main/java/com/gw/database/WorkflowRepository.java b/src/main/java/com/gw/database/WorkflowRepository.java index 14e104041..4dd3ba3ad 100644 --- a/src/main/java/com/gw/database/WorkflowRepository.java +++ b/src/main/java/com/gw/database/WorkflowRepository.java @@ -4,14 +4,15 @@ import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.CrudRepository; +import org.springframework.data.repository.query.Param; import com.gw.jpa.GWProcess; import com.gw.jpa.Workflow; public interface WorkflowRepository extends CrudRepository{ - @Query(value="select * from workflow where name like '%?1%'", + @Query(value="select * from workflow where name like CONCAT('%',:keyword,'%')", nativeQuery=true) - Collection findProcessesByNameAlike(String keyword); + Collection findProcessesByNameAlike(@Param("keyword") String keyword); }