mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-07 17:38:32 +08:00
PrettyFactory
This commit is contained in:
parent
4861535f44
commit
f31615ff4a
@ -26,17 +26,17 @@ import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
public interface BasicController <T extends JpaBaseDomain> {
|
||||
|
||||
public JpaPageResults<T> pageResults(@ModelAttribute("modelAttr") T modelAttr);
|
||||
public JpaPageResults<T> pageResults(@ModelAttribute("modelAttribute") T modelAttribute);
|
||||
|
||||
public ModelAndView forwardAdd(@ModelAttribute("modelAttr") T modelAttr);
|
||||
public ModelAndView forwardAdd(@ModelAttribute("modelAttribute") T modelAttribute);
|
||||
|
||||
public Message insert(@ModelAttribute("modelAttr") T modelAttr);
|
||||
public Message insert(@ModelAttribute("modelAttribute") T modelAttribute);
|
||||
|
||||
public ModelAndView forwardUpdate(@PathVariable("id") String id);
|
||||
|
||||
public Message update(@ModelAttribute("modelAttr") T modelAttr);
|
||||
public Message update(@ModelAttribute("modelAttribute") T modelAttribute);
|
||||
|
||||
public Message delete(@ModelAttribute("modelAttr") T modelAttr) ;
|
||||
public Message delete(@ModelAttribute("modelAttribute") T modelAttribute) ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -37,6 +37,7 @@ import freemarker.template.TemplateException;
|
||||
@Component
|
||||
public class ConfigurerFreeMarker implements ApplicationContextAware {
|
||||
private static final Logger _logger = LoggerFactory.getLogger(ConfigurerFreeMarker.class);
|
||||
|
||||
ApplicationContext applicationContext ;
|
||||
|
||||
@Autowired
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
|
||||
package org.maxkey.util;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.maxkey.pretty.PrettyFactory;
|
||||
|
||||
public class SqlPrettyTest {
|
||||
@ -24,8 +25,9 @@ public class SqlPrettyTest {
|
||||
public SqlPrettyTest() {
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@Test
|
||||
public void testSqlFormat() {
|
||||
String sqlString="select * from userinfo where t='111' order by t,s,t";
|
||||
System.out.println(PrettyFactory.getSqlPretty().format(sqlString));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user