Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ★ BCommand.java
- package com.javalec.spring_16_1_ex1_srpingex.command;
- import org.springframework.ui.Model;
- public interface BCommand {
- void execute(Model model);
- }
- ★BContentCommand.java
- package com.javalec.spring_16_1_ex1_srpingex.command;
- import java.util.Map;
- import javax.servlet.http.HttpServletRequest;
- import org.springframework.ui.Model;
- import com.javalec.spring_16_1_ex1_srpingex.dao.BDao;
- import com.javalec.spring_16_1_ex1_srpingex.dto.BDto;
- public class BContentCommand implements BCommand {
- @Override
- public void execute(Model model) {
- // TODO Auto-generated method stub
- Map<String, Object> map = model.asMap();
- HttpServletRequest request = (HttpServletRequest) map.get("request");
- String bId = request.getParameter("bId");
- BDao dao = new BDao();
- BDto dto = dao.contentView(bId);
- model.addAttribute("content_view", dto);
- }
- }
- ★ web.xml
- <?xml version="1.0" encoding="UTF-8"?>
- <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
- <!-- The definition of the Root Spring Container shared by all Servlets and Filters -->
- <context-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>/WEB-INF/spring/root-context.xml</param-value>
- </context-param>
- <!-- Creates the Spring Container shared by all Servlets and Filters -->
- <listener>
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
- </listener>
- <!-- Processes application requests -->
- <servlet>
- <servlet-name>appServlet</servlet-name>
- <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
- <init-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>appServlet</servlet-name>
- <url-pattern>/</url-pattern>
- </servlet-mapping>
- <filter>
- <filter-name>encodingFilter</filter-name>
- <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
- <init-param>
- <param-name>encoding</param-name>
- <param-value>UTF-8</param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <filter-name>encodingFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
- </web-app>
- ★ servlet-context.xml
- <?xml version="1.0" encoding="UTF-8"?>
- <beans:beans xmlns="http://www.springframework.org/schema/mvc"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:beans="http://www.springframework.org/schema/beans"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
- <!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->
- <!-- Enables the Spring MVC @Controller programming model -->
- <annotation-driven />
- <!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->
- <resources mapping="/resources/**" location="/resources/" />
- <!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory -->
- <beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <beans:property name="prefix" value="/WEB-INF/views/" />
- <beans:property name="suffix" value=".jsp" />
- </beans:bean>
- <context:component-scan base-package="com.javalec.spring_16_1_ex1_srpingex" />
- </beans:beans>
- ★ BController.java
- package com.javalec.spring_16_1_ex1_srpingex.controller;
- import javax.servlet.http.HttpServletRequest;
- import org.springframework.stereotype.Controller;
- import org.springframework.ui.Model;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestMethod;
- import com.javalec.spring_16_1_ex1_srpingex.command.BCommand;
- import com.javalec.spring_16_1_ex1_srpingex.command.BContentCommand;
- import com.javalec.spring_16_1_ex1_srpingex.command.BDeleteCommand;
- import com.javalec.spring_16_1_ex1_srpingex.command.BListCommand;
- import com.javalec.spring_16_1_ex1_srpingex.command.BModifyCommand;
- import com.javalec.spring_16_1_ex1_srpingex.command.BReplyCommand;
- import com.javalec.spring_16_1_ex1_srpingex.command.BReplyViewCommand;
- import com.javalec.spring_16_1_ex1_srpingex.command.BWriteCommand;
- /**
- * Servlet implementation class BoardFrontController
- */
- @Controller
- public class BController {
- BCommand command = null;
- @RequestMapping("/list")
- public String list(Model model) {
- System.out.println("list()");
- command = new BListCommand();
- command.execute(model);
- return "list";
- }
- @RequestMapping("/write_view")
- public String write_view(Model model) {
- System.out.println("write_view()");
- return "write_view";
- }
- @RequestMapping("/write")
- public String write(HttpServletRequest request, Model model) {
- System.out.println("write()");
- model.addAttribute("request", request);
- command = new BWriteCommand();
- command.execute(model);
- return "redirect:list";
- }
- @RequestMapping("/content_view")
- public String content_view(HttpServletRequest request, Model model){
- System.out.println("content_view()");
- model.addAttribute("request", request);
- command = new BContentCommand();
- command.execute(model);
- return "content_view";
- }
- @RequestMapping(value="/modify", method=RequestMethod.POST )
- public String modify(HttpServletRequest request, Model model){
- System.out.println("modify()");
- model.addAttribute("request", request);
- command = new BModifyCommand();
- command.execute(model);
- return "redirect:list";
- }
- @RequestMapping("/reply_view")
- public String reply_view(HttpServletRequest request, Model model){
- System.out.println("reply_view()");
- model.addAttribute("request", request);
- command = new BReplyViewCommand();
- command.execute(model);
- return "reply_view";
- }
- @RequestMapping("/reply")
- public String reply(HttpServletRequest request, Model model) {
- System.out.println("reply()");
- model.addAttribute("request", request);
- command = new BReplyCommand();
- command.execute(model);
- return "redirect:list";
- }
- @RequestMapping("/delete")
- public String delete(HttpServletRequest request, Model model) {
- System.out.println("delete()");
- model.addAttribute("request", request);
- command = new BDeleteCommand();
- command.execute(model);
- return "redirect:list";
- }
- }
- ★ HomeController.java
- package com.javalec.spring_16_1_ex1_srpingex;
- import java.text.DateFormat;
- import java.util.Date;
- import java.util.Locale;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
- import org.springframework.stereotype.Controller;
- import org.springframework.ui.Model;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestMethod;
- /**
- * Handles requests for the application home page.
- */
- @Controller
- public class HomeController {
- private static final Logger logger = LoggerFactory.getLogger(HomeController.class);
- /**
- * Simply selects the home view to render by returning its name.
- */
- @RequestMapping(value = "/", method = RequestMethod.GET)
- public String home(Locale locale, Model model) {
- logger.info("Welcome home! The client locale is {}.", locale);
- Date date = new Date();
- DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale);
- String formattedDate = dateFormat.format(date);
- model.addAttribute("serverTime", formattedDate );
- return "home";
- }
- }
- ★ BDao.java
- package com.javalec.spring_16_1_ex1_srpingex.dao;
- import java.sql.Connection;
- import java.sql.PreparedStatement;
- import java.sql.ResultSet;
- import java.sql.Timestamp;
- import java.util.ArrayList;
- import javax.naming.Context;
- import javax.naming.InitialContext;
- import javax.sql.DataSource;
- import com.javalec.spring_16_1_ex1_srpingex.dto.BDto;
- public class BDao {
- DataSource dataSource;
- public BDao() {
- // TODO Auto-generated constructor stub
- try {
- Context context = new InitialContext();
- dataSource = (DataSource) context.lookup("java:comp/env/jdbc/Oracle11g");
- } catch (Exception e) {
- // TODO: handle exception
- e.printStackTrace();
- }
- }
- public void write(String bName, String bTitle, String bContent) {
- // TODO Auto-generated method stub
- Connection connection = null;
- PreparedStatement preparedStatement = null;
- try {
- connection = dataSource.getConnection();
- String query = "insert into mvc_board (bId, bName, bTitle, bContent, bHit, bGroup, bStep, bIndent) values (mvc_board_seq.nextval, ?, ?, ?, 0, mvc_board_seq.currval, 0, 0 )";
- preparedStatement = connection.prepareStatement(query);
- preparedStatement.setString(1, bName);
- preparedStatement.setString(2, bTitle);
- preparedStatement.setString(3, bContent);
- int rn = preparedStatement.executeUpdate();
- } catch (Exception e) {
- // TODO: handle exception
- e.printStackTrace();
- } finally {
- try {
- if(preparedStatement != null) preparedStatement.close();
- if(connection != null) connection.close();
- } catch (Exception e2) {
- // TODO: handle exception
- e2.printStackTrace();
- }
- }
- }
- public ArrayList<BDto> list() {
- ArrayList<BDto> dtos = new ArrayList<BDto>();
- Connection connection = null;
- PreparedStatement preparedStatement = null;
- ResultSet resultSet = null;
- try {
- connection = dataSource.getConnection();
- String query = "select bId, bName, bTitle, bContent, bDate, bHit, bGroup, bStep, bIndent from mvc_board order by bGroup desc, bStep asc";
- preparedStatement = connection.prepareStatement(query);
- resultSet = preparedStatement.executeQuery();
- while (resultSet.next()) {
- int bId = resultSet.getInt("bId");
- String bName = resultSet.getString("bName");
- String bTitle = resultSet.getString("bTitle");
- String bContent = resultSet.getString("bContent");
- Timestamp bDate = resultSet.getTimestamp("bDate");
- int bHit = resultSet.getInt("bHit");
- int bGroup = resultSet.getInt("bGroup");
- int bStep = resultSet.getInt("bStep");
- int bIndent = resultSet.getInt("bIndent");
- BDto dto = new BDto(bId, bName, bTitle, bContent, bDate, bHit, bGroup, bStep, bIndent);
- dtos.add(dto);
- }
- } catch (Exception e) {
- // TODO: handle exception
- e.printStackTrace();
- } finally {
- try {
- if(resultSet != null) resultSet.close();
- if(preparedStatement != null) preparedStatement.close();
- if(connection != null) connection.close();
- } catch (Exception e2) {
- // TODO: handle exception
- e2.printStackTrace();
- }
- }
- return dtos;
- }
- public BDto contentView(String strID) {
- // TODO Auto-generated method stub
- upHit(strID);
- BDto dto = null;
- Connection connection = null;
- PreparedStatement preparedStatement = null;
- ResultSet resultSet = null;
- try {
- connection = dataSource.getConnection();
- String query = "select * from mvc_board where bId = ?";
- preparedStatement = connection.prepareStatement(query);
- preparedStatement.setInt(1, Integer.parseInt(strID));
- resultSet = preparedStatement.executeQuery();
- if(resultSet.next()) {
- int bId = resultSet.getInt("bId");
- String bName = resultSet.getString("bName");
- String bTitle = resultSet.getString("bTitle");
- String bContent = resultSet.getString("bContent");
- Timestamp bDate = resultSet.getTimestamp("bDate");
- int bHit = resultSet.getInt("bHit");
- int bGroup = resultSet.getInt("bGroup");
- int bStep = resultSet.getInt("bStep");
- int bIndent = resultSet.getInt("bIndent");
- dto = new BDto(bId, bName, bTitle, bContent, bDate, bHit, bGroup, bStep, bIndent);
- }
- } catch (Exception e) {
- // TODO: handle exception
- e.printStackTrace();
- } finally {
- try {
- if(resultSet != null) resultSet.close();
- if(preparedStatement != null) preparedStatement.close();
- if(connection != null) connection.close();
- } catch (Exception e2) {
- // TODO: handle exception
- e2.printStackTrace();
- }
- }
- return dto;
- }
- public void modify(String bId, String bName, String bTitle, String bContent) {
- // TODO Auto-generated method stub
- Connection connection = null;
- PreparedStatement preparedStatement = null;
- try {
- connection = dataSource.getConnection();
- String query = "update mvc_board set bName = ?, bTitle = ?, bContent = ? where bId = ?";
- preparedStatement = connection.prepareStatement(query);
- preparedStatement.setString(1, bName);
- preparedStatement.setString(2, bTitle);
- preparedStatement.setString(3, bContent);
- preparedStatement.setInt(4, Integer.parseInt(bId));
- int rn = preparedStatement.executeUpdate();
- } catch (Exception e) {
- // TODO: handle exception
- e.printStackTrace();
- } finally {
- try {
- if(preparedStatement != null) preparedStatement.close();
- if(connection != null) connection.close();
- } catch (Exception e2) {
- // TODO: handle exception
- e2.printStackTrace();
- }
- }
- }
- public void delete(String bId) {
- // TODO Auto-generated method stub
- Connection connection = null;
- PreparedStatement preparedStatement = null;
- try {
- connection = dataSource.getConnection();
- String query = "delete from mvc_board where bId = ?";
- preparedStatement = connection.prepareStatement(query);
- preparedStatement.setInt(1, Integer.parseInt(bId));
- int rn = preparedStatement.executeUpdate();
- } catch (Exception e) {
- // TODO: handle exception
- e.printStackTrace();
- } finally {
- try {
- if(preparedStatement != null) preparedStatement.close();
- if(connection != null) connection.close();
- } catch (Exception e2) {
- // TODO: handle exception
- e2.printStackTrace();
- }
- }
- }
- public BDto reply_view(String str) {
- // TODO Auto-generated method stub
- BDto dto = null;
- Connection connection = null;
- PreparedStatement preparedStatement = null;
- ResultSet resultSet = null;
- try {
- connection = dataSource.getConnection();
- String query = "select * from mvc_board where bId = ?";
- preparedStatement = connection.prepareStatement(query);
- preparedStatement.setInt(1, Integer.parseInt(str));
- resultSet = preparedStatement.executeQuery();
- if(resultSet.next()) {
- int bId = resultSet.getInt("bId");
- String bName = resultSet.getString("bName");
- String bTitle = resultSet.getString("bTitle");
- String bContent = resultSet.getString("bContent");
- Timestamp bDate = resultSet.getTimestamp("bDate");
- int bHit = resultSet.getInt("bHit");
- int bGroup = resultSet.getInt("bGroup");
- int bStep = resultSet.getInt("bStep");
- int bIndent = resultSet.getInt("bIndent");
- dto = new BDto(bId, bName, bTitle, bContent, bDate, bHit, bGroup, bStep, bIndent);
- }
- } catch (Exception e) {
- // TODO: handle exception
- e.printStackTrace();
- } finally {
- try {
- if(preparedStatement != null) preparedStatement.close();
- if(connection != null) connection.close();
- } catch (Exception e2) {
- // TODO: handle exception
- e2.printStackTrace();
- }
- }
- return dto;
- }
- public void reply(String bId, String bName, String bTitle, String bContent, String bGroup, String bStep, String bIndent) {
- // TODO Auto-generated method stub
- replyShape(bGroup, bStep);
- Connection connection = null;
- PreparedStatement preparedStatement = null;
- try {
- connection = dataSource.getConnection();
- String query = "insert into mvc_board (bId, bName, bTitle, bContent, bGroup, bStep, bIndent) values (mvc_board_seq.nextval, ?, ?, ?, ?, ?, ?)";
- preparedStatement = connection.prepareStatement(query);
- preparedStatement.setString(1, bName);
- preparedStatement.setString(2, bTitle);
- preparedStatement.setString(3, bContent);
- preparedStatement.setInt(4, Integer.parseInt(bGroup));
- preparedStatement.setInt(5, Integer.parseInt(bStep) + 1);
- preparedStatement.setInt(6, Integer.parseInt(bIndent) + 1);
- int rn = preparedStatement.executeUpdate();
- } catch (Exception e) {
- // TODO: handle exception
- e.printStackTrace();
- } finally {
- try {
- if(preparedStatement != null) preparedStatement.close();
- if(connection != null) connection.close();
- } catch (Exception e2) {
- // TODO: handle exception
- e2.printStackTrace();
- }
- }
- }
- private void replyShape( String strGroup, String strStep) {
- // TODO Auto-generated method stub
- Connection connection = null;
- PreparedStatement preparedStatement = null;
- try {
- connection = dataSource.getConnection();
- String query = "update mvc_board set bStep = bStep + 1 where bGroup = ? and bStep > ?";
- preparedStatement = connection.prepareStatement(query);
- preparedStatement.setInt(1, Integer.parseInt(strGroup));
- preparedStatement.setInt(2, Integer.parseInt(strStep));
- int rn = preparedStatement.executeUpdate();
- } catch (Exception e) {
- // TODO: handle exception
- e.printStackTrace();
- } finally {
- try {
- if(preparedStatement != null) preparedStatement.close();
- if(connection != null) connection.close();
- } catch (Exception e2) {
- // TODO: handle exception
- e2.printStackTrace();
- }
- }
- }
- private void upHit( String bId) {
- // TODO Auto-generated method stub
- Connection connection = null;
- PreparedStatement preparedStatement = null;
- try {
- connection = dataSource.getConnection();
- String query = "update mvc_board set bHit = bHit + 1 where bId = ?";
- preparedStatement = connection.prepareStatement(query);
- preparedStatement.setString(1, bId);
- int rn = preparedStatement.executeUpdate();
- } catch (Exception e) {
- // TODO: handle exception
- e.printStackTrace();
- } finally {
- try {
- if(preparedStatement != null) preparedStatement.close();
- if(connection != null) connection.close();
- } catch (Exception e2) {
- // TODO: handle exception
- e2.printStackTrace();
- }
- }
- }
- }
- ★ BDto.java
- package com.javalec.spring_16_1_ex1_srpingex.dto;
- import java.sql.Timestamp;
- public class BDto {
- int bId;
- String bName;
- String bTitle;
- String bContent;
- Timestamp bDate;
- int bHit;
- int bGroup;
- int bStep;
- int bIndent;
- public BDto() {
- // TODO Auto-generated constructor stub
- }
- public BDto(int bId, String bName, String bTitle, String bContent, Timestamp bDate, int bHit, int bGroup, int bStep, int bIndent) {
- // TODO Auto-generated constructor stub
- this.bId = bId;
- this.bName = bName;
- this.bTitle = bTitle;
- this.bContent = bContent;
- this.bDate = bDate;
- this.bHit = bHit;
- this.bGroup = bGroup;
- this.bStep = bStep;
- this.bIndent = bIndent;
- }
- public int getbId() {
- return bId;
- }
- public void setbId(int bId) {
- this.bId = bId;
- }
- public String getbName() {
- return bName;
- }
- public void setbName(String bName) {
- this.bName = bName;
- }
- public String getbTitle() {
- return bTitle;
- }
- public void setbTitle(String bTitle) {
- this.bTitle = bTitle;
- }
- public String getbContent() {
- return bContent;
- }
- public void setbContent(String bContent) {
- this.bContent = bContent;
- }
- public Timestamp getbDate() {
- return bDate;
- }
- public void setbDate(Timestamp bDate) {
- this.bDate = bDate;
- }
- public int getbHit() {
- return bHit;
- }
- public void setbHit(int bHit) {
- this.bHit = bHit;
- }
- public int getbGroup() {
- return bGroup;
- }
- public void setbGroup(int bGroup) {
- this.bGroup = bGroup;
- }
- public int getbStep() {
- return bStep;
- }
- public void setbStep(int bStep) {
- this.bStep = bStep;
- }
- public int getbIndent() {
- return bIndent;
- }
- public void setbIndent(int bIndent) {
- this.bIndent = bIndent;
- }
- }
- ★ log4j.xml
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" "log4j.dtd">
- <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
- <!-- Appenders -->
- <appender name="console" class="org.apache.log4j.ConsoleAppender">
- <param name="Target" value="System.out" />
- <layout class="org.apache.log4j.PatternLayout">
- <param name="ConversionPattern" value="%-5p: %c - %m%n" />
- </layout>
- </appender>
- <!-- Application Loggers -->
- <logger name="com.javalec.spring_16_1_ex1_srpingex">
- <level value="info" />
- </logger>
- <!-- 3rdparty Loggers -->
- <logger name="org.springframework.core">
- <level value="info" />
- </logger>
- <logger name="org.springframework.beans">
- <level value="info" />
- </logger>
- <logger name="org.springframework.context">
- <level value="info" />
- </logger>
- <logger name="org.springframework.web">
- <level value="info" />
- </logger>
- <!-- Root Logger -->
- <root>
- <priority value="warn" />
- <appender-ref ref="console" />
- </root>
- </log4j:configuration>
- ★ pom.xml
- <?xml version="1.0" encoding="UTF-8"?>
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>com.javalec</groupId>
- <artifactId>spring_16_1_ex1_srpingex</artifactId>
- <name>spring_16_1_ex1_srpingex</name>
- <packaging>war</packaging>
- <version>1.0.0-BUILD-SNAPSHOT</version>
- <properties>
- <java-version>1.6</java-version>
- <org.springframework-version>3.1.1.RELEASE</org.springframework-version>
- <org.aspectj-version>1.6.10</org.aspectj-version>
- <org.slf4j-version>1.6.6</org.slf4j-version>
- </properties>
- <dependencies>
- <!-- Spring -->
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>${org.springframework-version}</version>
- <exclusions>
- <!-- Exclude Commons Logging in favor of SLF4j -->
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-webmvc</artifactId>
- <version>${org.springframework-version}</version>
- </dependency>
- <!-- AspectJ -->
- <dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- <version>${org.aspectj-version}</version>
- </dependency>
- <!-- Logging -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>${org.slf4j-version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl-over-slf4j</artifactId>
- <version>${org.slf4j-version}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>${org.slf4j-version}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.15</version>
- <exclusions>
- <exclusion>
- <groupId>javax.mail</groupId>
- <artifactId>mail</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.jms</groupId>
- <artifactId>jms</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.sun.jdmk</groupId>
- <artifactId>jmxtools</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.sun.jmx</groupId>
- <artifactId>jmxri</artifactId>
- </exclusion>
- </exclusions>
- <scope>runtime</scope>
- </dependency>
- <!-- @Inject -->
- <dependency>
- <groupId>javax.inject</groupId>
- <artifactId>javax.inject</artifactId>
- <version>1</version>
- </dependency>
- <!-- Servlet -->
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
- <version>1.2</version>
- </dependency>
- <!-- Test -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.7</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-eclipse-plugin</artifactId>
- <version>2.9</version>
- <configuration>
- <additionalProjectnatures>
- <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
- </additionalProjectnatures>
- <additionalBuildcommands>
- <buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
- </additionalBuildcommands>
- <downloadSources>true</downloadSources>
- <downloadJavadocs>true</downloadJavadocs>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.5.1</version>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- <compilerArgument>-Xlint:all</compilerArgument>
- <showWarnings>true</showWarnings>
- <showDeprecation>true</showDeprecation>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>1.2.1</version>
- <configuration>
- <mainClass>org.test.int1.Main</mainClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </project>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement