Archetype Created Web ApplicationcontextConfigLocationclasspath:spring-mybatis.xmlencodingFilterorg.springframework.web.filter.CharacterEncodingFiltertrueencodingUTF-8encodingFilter/*org.springframework.web.context.ContextLoaderListenerorg.springframework.web.util.IntrospectorCleanupListenerSpringMVCorg.springframework.web.servlet.DispatcherServletcontextConfigLocationclasspath:spring-mvc.xml1trueSpringMVC/default*.jpgdefault*.jsdefault*.cssdefault*.gif/index.jsp
package com.cn.ssm.pojo;
public class User {
private Integer id;
private String userName;
private String password;
private Integer age;
/**
* @param id
* @param userName
* @param password
* @param age
*/
public User() {
super();
}
public User(Integer id, String userName, String password, Integer age) {
super();
this.id = id;
this.userName = userName;
this.password = password;
this.age = age;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
@Override
public String toString() {
return "User [id=" + id + ", userName=" + userName + ", password=" + password + ", age=" + age + "]";
}
}
UserMapper.java
package com.cn.ssm.dao;
import com.cn.ssm.pojo.User;
public interface UserMapper {
int deleteByPrimaryKey(Integer id);
int insert(User record);
int insertSelective(User record);
User selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(User record);
int updateByPrimaryKey(User record);
}
UserMapper.xml
id, user_name, password, age
delete from user_t
where id = #{id,jdbcType=INTEGER}
insert into user_t (id, user_name, password,
age)
values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR},
#{age,jdbcType=INTEGER})
insert into user_t
id,
user_name,
password,
age,
#{id,jdbcType=INTEGER},
#{userName,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR},
#{age,jdbcType=INTEGER},
update user_t
user_name = #{userName,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
age = #{age,jdbcType=INTEGER},
where id = #{id,jdbcType=INTEGER}
update user_t
set user_name = #{userName,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
age = #{age,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
IUserService.java
package com.cn.ssm.service;
import com.cn.ssm.pojo.User;
public interface IUserService {
public User getUserById(int userId);
}
UserServiceImpl.java
package com.cn.ssm.service.impl;
import javax.annotation.Resource;
import javax.transaction.Transactional;
import org.springframework.stereotype.Service;
import com.cn.ssm.dao.UserMapper;
import com.cn.ssm.pojo.User;
import com.cn.ssm.service.IUserService;
@Service
@Transactional
public class UserServiceImpl implements IUserService {
@Resource
public UserMapper userMapper;
public User getUserById(int userId) {
// TODO Auto-generated method stub
return this.userMapper.selectByPrimaryKey(userId);
}
}
UserController.java
package com.cn.ssm.controller;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import com.cn.ssm.pojo.User;
import com.cn.ssm.service.IUserService;
@Controller
@RequestMapping("/user")
public class UserController {
@Resource
private IUserService userService;
@RequestMapping("userShow")
public String toIndex(HttpServletRequest request, Model model) {
int userId = Integer.parseInt(request.getParameter("id"));
System.out.println(userId);
User user = userService.getUserById(userId);
model.addAttribute("user", user);
return "showUser";
}
}
冒泡排序
public static void sort(Integer[] param) {
for (int i = param.length - 1; i > 0; i--) {
for (int j = 0; j < i; j++) {
int current = param[j];
int next = param[j + 1];
方法一:
public class Zhidao {
public static void main(String args[]) {
String s = "sdf灭礌 kjl d{';\fdsjlk是";
int n=0;
for(int i=0; i<s.length(); i++) {
n = (int)s.charAt(i);
if((
IF OBJECT_ID('tempdb..#ABC') is not null
drop table tempdb..#ABC
create table #ABC
(
PATHNAME NVARCHAR(50)
)
insert into #ABC
SELECT N'/ABCDEFGHI'
UNION ALL SELECT N'/ABCDGAFGASASSDFA'
UNION ALL
http://www.sdn.sap.com/irj/boc/business-objects-for-sap-faq
Besides, I care that how to integrate tightly.
By the way, for BW consultants, please just focus on Query Designer which i
结构
继承关系
public static final class Manifest.permission_group extends Object
java.lang.Object
android. Manifest.permission_group 常量
ACCOUNTS 直接通过统计管理器访问管理的统计
COST_MONEY可以用来让用户花钱但不需要通过与他们直接牵涉的权限
D