jdaugherty commented on code in PR #15036:
URL: https://github.com/apache/grails-core/pull/15036#discussion_r2342434113


##########
grails-scaffolding/src/main/groovy/grails/plugin/scaffolding/DomainServiceLocator.java:
##########
@@ -0,0 +1,98 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    https://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package grails.plugin.scaffolding;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+import org.springframework.context.ApplicationContext;
+
+import grails.util.Holders;
+import org.grails.datastore.gorm.GormEntity;
+
+/**
+ * Resolves the appropriate service bean for a given domain class by:
+ *   - Scanning only beans of type GormService
+ *   - Matching via: ((GormEntity<?>) 
service.getResource()).instanceOf(domainClass)
+ *
+ * Keeps a single shared cache for the whole app.
+ */
+public final class DomainServiceLocator {

Review Comment:
   For example: 
   
   Add a subproject: `grails-test-examples/scaffolding` (can copy gsp or 
sitemesh if you want as a basis, the only thing that needs updated is 
settings.gradle & adding the files from grails-test-examples/scaffolding).  
Then just add your domain scenario & a geb test that calls the screen / makes 
sure it doesn't error.  
   
   We're not asking you to test every functionality of scaffolding.  Just to 
grow the test coverage in this area as we make enhancements.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to