Skip to content

Instantly share code, notes, and snippets.

@mystelynx
Created November 28, 2013 12:11
Show Gist options
  • Save mystelynx/7690910 to your computer and use it in GitHub Desktop.
Save mystelynx/7690910 to your computer and use it in GitHub Desktop.
SpringのXMLでSQL定義1
<beans:bean id="foo" class="SomeClass">
<property name="aSql" value="select * from a_table" />
<property name="bSql" value="select * from b_table" />
<property name="cSql">
<value>
<![CDATA[
select
*
from c_table
where a > 1
]]>
</value>
</property>
</beans:bean>
public class SomeClass {
String aSql;
String bSql;
String cSql;
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment