Move runtime hints from sample to core

- Relates #490
This commit is contained in:
Janne Valkealahti
2022-09-07 09:58:25 +01:00
parent 146f9165ea
commit 68af0bb804
4 changed files with 7 additions and 8 deletions

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.shell.samples.config; package org.springframework.shell;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@@ -28,7 +28,7 @@ import org.springframework.aot.hint.RuntimeHintsRegistrar;
import org.springframework.aot.hint.TypeHint; import org.springframework.aot.hint.TypeHint;
import org.springframework.aot.hint.TypeReference; import org.springframework.aot.hint.TypeReference;
public class SamplesRuntimeHints implements RuntimeHintsRegistrar { public class JnaRuntimeHints implements RuntimeHintsRegistrar {
@Override @Override
public void registerHints(RuntimeHints hints, ClassLoader classLoader) { public void registerHints(RuntimeHints hints, ClassLoader classLoader) {

View File

@@ -1,2 +1,3 @@
org.springframework.aot.hint.RuntimeHintsRegistrar=\ org.springframework.aot.hint.RuntimeHintsRegistrar=\
org.springframework.shell.CoreResourcesRuntimeHints org.springframework.shell.CoreResourcesRuntimeHints,\
org.springframework.shell.JnaRuntimeHints

View File

@@ -1,4 +1,4 @@
package org.springframework.shell.samples.config; package org.springframework.shell;
import java.util.Arrays; import java.util.Arrays;
import java.util.Set; import java.util.Set;
@@ -14,7 +14,7 @@ import org.springframework.aot.hint.TypeReference;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
public class SamplesRuntimeHintsTests { public class JnaRuntimeHintsTests {
@Test @Test
void test() { void test() {
@@ -35,7 +35,7 @@ public class SamplesRuntimeHintsTests {
private ReflectionHints registerHints() { private ReflectionHints registerHints() {
RuntimeHints hints = new RuntimeHints(); RuntimeHints hints = new RuntimeHints();
new SamplesRuntimeHints().registerHints(hints, getClass().getClassLoader()); new JnaRuntimeHints().registerHints(hints, getClass().getClassLoader());
return hints.reflection(); return hints.reflection();
} }

View File

@@ -1,2 +0,0 @@
org.springframework.aot.hint.RuntimeHintsRegistrar=\
org.springframework.shell.samples.config.SamplesRuntimeHints