<settings> <setting name="useActualParamName" value="false" /> </settings>
--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
package com.example;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class DemoApplication implements CommandLineRunner {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
private final TestMapper testMapper;
public DemoApplication(TestMapper testMapper) {
this.testMapper = testMapper;
}
@Override
public void run(String... args) throws Exception {
System.out.println(testMapper.calc(1, 1));
}
@Mapper
public interface TestMapper {
@Select("SELECT #{a} + #{b}")
long calc(int a, int b);
}
}
@Select("SELECT 'Hello' || #{name}")
String generateGreetingMessage(String s);
@Select("SELECT 'Hello' || #{value}")
String generateGreetingMessage(String s);
@Select("SELECT 'Hello' || #{s}")
String generateGreetingMessage(String s);