看到一遍文章说controller可以加事务,特别测试了下,发现不行
摘要:文章内容https://blog.csdn.net/mmm333zzz/article/details/45288061附上测试代码@Controller@Transactionalpublic class DemoController2 { @Autowired...
阅读全文
posted @
2018-07-13 14:50
2637282556
阅读(229)
推荐(0)
Spring事务异常回滚,捕获异常但是事物不回滚
摘要:转载http://blog.csdn.net/yipanbo/article/details/46048413@Service @Transactional public class SupplementaryBudgetServiceImpl中1 类似这样的方法不会...
阅读全文
posted @
2018-02-25 15:11
2637282556
阅读(221)
推荐(0)
购物商城--商品详情多级联动
摘要:1跳转到该页面,默认选择第一颜色,第一个尺码,并显示价格,运费,库存 2.当选择一个颜色时,尺码默认选择第一个,动态显示价格等数据 3,当选择尺码时候,对应显示该尺码颜色对应的价格数据jsp ...
阅读全文
posted @
2017-04-18 16:48
2637282556
阅读(323)
推荐(0)
异步返回各种格式工具类
摘要://发送内容 public static void render(HttpServletResponse response,String contentType,String text){ response.setContentType...
阅读全文
posted @
2017-04-18 15:37
2637282556
阅读(92)
推荐(0)
购物商城---SpringMVC拦截器的使用
摘要:springmvc-front.xml ...
阅读全文
posted @
2017-04-18 15:34
2637282556
阅读(129)
推荐(0)
springMVC转发与重定向
摘要:@RequestMapping("queryUser5") public String queryUser5(String Userid,ModelMap modelMap) {// return "redirect:queryUser.ac...
阅读全文
posted @
2017-04-15 11:43
2637282556
阅读(123)
推荐(0)
SpringMVC传入参数
摘要:测试使用的类:public class User { private String name;// 姓名 private Integer age;// 年龄 public String getName() { return name; ...
阅读全文
posted @
2017-04-15 11:39
2637282556
阅读(241)
推荐(0)
springMVC+spring+hibernate基本框架的搭建
摘要:模型: 1web.xml springMVC1 index.html index.htm index.jsp default.html default.htm default.jsp contextCo...
阅读全文
posted @
2017-04-14 17:32
2637282556
阅读(233)
推荐(0)
hibernate+spring+springMVC基本配置
摘要:web.xml contextConfigLocation classpath*:config/springAnnotation-*.xml org.springframework.web.context.Cont...
阅读全文
posted @
2017-04-13 18:34
2637282556
阅读(125)
推荐(0)
spring+springMVC的基本配置
摘要:web.xml contextConfigLocation classpath*:config/springAnnotation-core.xml org.springframework.web.context...
阅读全文
posted @
2017-04-13 17:17
2637282556
阅读(127)
推荐(0)
SpringMVC上传文件
摘要:web.xml springMVC org.springframework.web.servlet.DispatcherServlet contextConfigLocation ...
阅读全文
posted @
2017-04-13 10:55
2637282556
阅读(133)
推荐(0)
SpringMVC 返回json
摘要:1.页面传递json数据,ajax传递 jsp 姓名: 年龄: controller@Controller@RequestMapping("/test/json")public class TestJson { @RequestMapping(...
阅读全文
posted @
2017-04-13 00:51
2637282556
阅读(150)
推荐(0)
(推荐使用)SpringMVC注解,基本配置
摘要:基本 web.xml springMVC org.springframework.web.servlet.DispatcherServlet contextConfigLocation ...
阅读全文
posted @
2017-04-12 23:36
2637282556
阅读(136)
推荐(0)
springMVC 注解 controller层的优化
摘要:1类中方法对应的URL请求路径有相同部分,可以放在类外面@Controller@RequestMapping("/user")public class LonginController { @RequestMapping("/login") //实际请求路径是...
阅读全文
posted @
2017-04-12 22:58
2637282556
阅读(177)
推荐(0)
(基本不使用这种)springMVC注解
摘要:基本配置 web.xml springMVC org.springframework.web.servlet.DispatcherServlet contextConfigLocation ...
阅读全文
posted @
2017-04-12 22:53
2637282556
阅读(130)
推荐(0)
springMVC访问静态资源
摘要:1.默认的访问的URL都会被DispatcherServlet所拦截,比如拦截规则定义为/; 也就是说,所有的请求都会被springMVC拦截,根据HandlerMapping的配置来匹配对应的URL映射,而对于静态资源来说,默认的Spring MVC是没有注册匹配...
阅读全文
posted @
2017-04-12 22:33
2637282556
阅读(108)
推荐(0)
(不推荐使用)springMVC基本配置+继承MultiActionController来实现根据参数名指定要请求的方法
摘要:基本配置: web.xml springMVC org.springframework.web.servlet.DispatcherServlet contextConfigLocati...
阅读全文
posted @
2017-04-12 18:19
2637282556
阅读(213)
推荐(0)
(不推荐使用)springMVC基本配置+controller层实现Controller接口
摘要:基本配置: web.xml springMVC org.springframework.web.servlet.DispatcherServlet contextConfigLocation ...
阅读全文
posted @
2017-04-12 17:26
2637282556
阅读(287)
推荐(0)