Spring Framwork Language Support v6.0.0-M2do so: 19 class SpecificationLikeTests { @Nested @DisplayName("a calculator") inner class Calculator { val calculator = SampleCalculator() @Test fun `should return the result of of adding the first number to the second number`() { val sum = calculator.sum(2, 4) assertEquals(6, sum) } @Test fun `should return the result of subtracting the second number number from the first number`() { val subtract = calculator.subtract(4, 2) assertEquals(2, subtract) } } } WebTestClient Type Inference Issue in Kotlin Due to a type inference issue0 码力 | 42 页 | 602.76 KB | 1 年前3
Spring Framwork Language Support v5.3.36 SNAPSHOTdo so: 19 class SpecificationLikeTests { @Nested @DisplayName("a calculator") inner class Calculator { val calculator = SampleCalculator() @Test fun `should return the result of of adding the first number to the second number`() { val sum = calculator.sum(2, 4) assertEquals(6, sum) } @Test fun `should return the result of subtracting the second number number from the first number`() { val subtract = calculator.subtract(4, 2) assertEquals(2, subtract) } } } WebTestClient Type Inference Issue in Kotlin Due to a type inference issue0 码力 | 42 页 | 603.79 KB | 1 年前3
Spring Framework 2.0.8 ReferenceFramework (2.0.8) 427 public interface Calculator { int add(int x, int y); } Here is an implementation of the Calculator interface in Groovy. // from the file 'calculator.groovy' package org.springframework GroovyCalculator implements Calculator { int add(int x, int y) { x + y } } <-- from the file 'beans.xml' --> Lastly ApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml"); Calculator calc = (Calculator) ctx.getBean("calculator"); System.out.println(calc.add(2, 8)); } } The resulting output from running0 码力 | 502 页 | 3.61 MB | 1 年前3
Spring Framework 2.0.3 Referencespringframework.scripting; public interface Calculator { int add(int x, int y); } Here is an implementation of the Calculator interface in Groovy. // from the file 'calculator.groovy' package org.springframework GroovyCalculator implements Calculator { int add(int x, int y) { x + y } } <-- from the file 'beans.xml' --> Lastly ApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml"); Calculator calc = (Calculator) ctx.getBean("calculator"); System.out.println(calc.add(2, 8)); } } The resulting output from running0 码力 | 495 页 | 3.57 MB | 1 年前3
Spring Framework 2.0.2 Referencespringframework.scripting; public interface Calculator { int add(int x, int y); } Here is an implementation of the Calculator interface in Groovy. // from the file 'calculator.groovy' package org.springframework GroovyCalculator implements Calculator { int add(int x, int y) { x + y } } <-- from the file 'beans.xml' --> Lastly ApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml"); Calculator calc = (Calculator) ctx.getBean("calculator"); System.out.println(calc.add(2, 8)); } } The resulting output from running0 码力 | 498 页 | 3.55 MB | 1 年前3
Spring Framework 2.0.7 ReferenceFramework (2.0.7) 427 public interface Calculator { int add(int x, int y); } Here is an implementation of the Calculator interface in Groovy. // from the file 'calculator.groovy' package org.springframework GroovyCalculator implements Calculator { int add(int x, int y) { x + y } } <-- from the file 'beans.xml' --> Lastly ApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml"); Calculator calc = (Calculator) ctx.getBean("calculator"); System.out.println(calc.add(2, 8)); } } The resulting output from running0 码力 | 502 页 | 3.61 MB | 1 年前3
Spring Framework 2.0.5 ReferenceFramework (2.0.5) 424 public interface Calculator { int add(int x, int y); } Here is an implementation of the Calculator interface in Groovy. // from the file 'calculator.groovy' package org.springframework GroovyCalculator implements Calculator { int add(int x, int y) { x + y } } <-- from the file 'beans.xml' --> Lastly ApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml"); Calculator calc = (Calculator) ctx.getBean("calculator"); System.out.println(calc.add(2, 8)); } } The resulting output from running0 码力 | 499 页 | 3.59 MB | 1 年前3
Spring Framework 2.0.6 ReferenceFramework (2.0.6) 424 public interface Calculator { int add(int x, int y); } Here is an implementation of the Calculator interface in Groovy. // from the file 'calculator.groovy' package org.springframework GroovyCalculator implements Calculator { int add(int x, int y) { x + y } } <-- from the file 'beans.xml' --> Lastly ApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml"); Calculator calc = (Calculator) ctx.getBean("calculator"); System.out.println(calc.add(2, 8)); } } The resulting output from running0 码力 | 499 页 | 3.60 MB | 1 年前3
Spring Framework 2.0.4 Referencespringframework.scripting; public interface Calculator { int add(int x, int y); } Here is an implementation of the Calculator interface in Groovy. // from the file 'calculator.groovy' package org.springframework GroovyCalculator implements Calculator { int add(int x, int y) { x + y } } <-- from the file 'beans.xml' --> Lastly ApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml"); Calculator calc = (Calculator) ctx.getBean("calculator"); System.out.println(calc.add(2, 8)); } } The resulting output from running0 码力 | 500 页 | 3.60 MB | 1 年前3
Spring Framework 2.5.x Referencespringframework.scripting; public interface Calculator { int add(int x, int y); } Here is an implementation of the Calculator interface in Groovy. // from the file 'calculator.groovy' package org.springframework GroovyCalculator implements Calculator { int add(int x, int y) { x + y } Dynamic language support Spring Framework (2.5.6) 513 } <-- from the file 'beans.xml' --> Lastly, here is a small application to exercise the above configuration. package org.springframework.scripting; import org.springframework.context.ApplicationContext;0 码力 | 590 页 | 4.31 MB | 1 年前3
共 154 条
- 1
- 2
- 3
- 4
- 5
- 6
- 16













