#1 download spring version(2.0.8 or other) ==> for aip local
spring-framework-2.0.8-with-dependencies.zip
#2 mvn pom.xml ==> load jar for server
blog: Getting started with maven and spring
add dependence:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.0.8</version>
</dependency>
#3 config web.xml ==> install spring
step one:
add file:applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>
<bean id="messageStore" class="com.mark.core.struts2.model.MessageStore">
<property name="message" value="MessageStore test" />
</bean>
</beans>
step two:
config web.xml
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
#4 test first application
package com.mark.core.spring2_0_8;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import com.mark.core.struts2.model.MessageStore;
public class Test {
public static void main(String[] args) {
ApplicationContext ac = new FileSystemXmlApplicationContext("src\\main\\webapp\\WEB-INF\\applicationContext.xml");
MessageStore m = (MessageStore)ac.getBean("messageStore");
System.out.println(m.getMessage());
}
}
#5 note
分享到:
相关推荐
### JAR File Clean MVN ( clean the target | download necessary dependencies | compile run the unit tests ) ... $ docker build -t javaspring_auth . Run the container $ docker run -it -p 8080:8
mvn spring-boot:run 数据库配置 spring.jpa.hibernate.ddl-auto: create 启动时生成表 spring.jpa.hibernate.ddl-auto: create-drop 启动时生成表,关闭时删除表结构 spring.jpa.hibernate.ddl-auto: update 根据...
在代码中配置了两个Maven配置文件-'dev'和'prod' #For开发人员构建-运行“ mvn clean install -Pdev” -运行“ mvn spring-boot:run -Pdev”以启动Spring Boot应用程序-使用url 访问API #For Prod Build-生产应用...
mvn clean install 与Docker一起运行 建立影像 使用fabric8插件创建图像 mvn docker:build 您可以在本地注册表中查看该图像 docker images 创建容器 使用以下命令运行容器 docker run -d -p 80:8080 demo/hello...
mvn clean install 然后mvn spring-boot:run 或者cd target java -jar bidrag-arbeidsflyt-<versjon>.jar 码头工人和肚子 需要安装Java,胃和泊坞窗 docker映像是作为nais应用程序运行的 mvn clean install 然后...
mvn spring-boot:run Docker构建 如果您在本地构建,则可以使用本地构建基础结构来创建docker映像,以节省构建时间: mvn clean install docker build -f Dockerfile-local -t identity-management . 如果您的机器...
全栈 可以通过以下命令完全构建该项目: mvn clean install This shall run the build for server side as jar and client side as jar.Stack: Spring Boot Angular 6 with Bootstrap最终的人工制品应为罐子。...
货币配置服务器 用于通过GIT,SVN或具有Java 8,Spring Cloud Finchley M8,Spring ...$ mvn clean install -U 2.构建泊坞窗映像 $ docker build -t ${APPLICATION_NAME}:latest 3.运行容器 $ docker run -d --rm
mvn spring-boot:run update 2018.02.24 增加Docker镜像创建和部署脚本 2018.01.21 支持服务端搜索text resource 支持带”的csv格式的text resource导入和生成。 2017.12.23 tag 支持多种颜色以及自选颜色 修复tag ...
单片到微服务转换工具 如何建立和开始项目 cd到项目目录 ...mvn spring-boot:run 后端将启动并在 Build and Start Angular Frontend cd frontend / src / main / frontend / npm start` 前端将启动并在
Spring Boot Maven 项目开始步骤: Pre-requisites: 1. Java must be installed 2. Install maven module ... - mvn clean install 1.c. Run the following command(s) in the terminal/comm
Spring Boot Maven 项目开始步骤: Pre-requisites: 1. Java must be installed 2. Install maven module ... - mvn clean install 1.c. Run the following command(s) in the terminal/comm
- 前端执行 `npm run build` 在dist目录下生成静态文件 - 3.服务器部署 - 运行后端,如使用Tomcat在上下文运行: `localhost:8080/easycloud` 路径:`/var/lib/tomcat/webapps/easycloud` - 将前端 `/dist` 目录...
弹簧角使用Spring Framework和Angularjs的SPA演示项目确保已安装含羞草: npm install -g mimosa 确保已安装业力npm install -g karma karma-cli 前端位于frontend /文件夹下: npm install mimosa build 运行业力...
mvn install #run fig up look #config 1.遵守spring变量查找规则,首先查找环境变量的值,在查询jvm中的值,最后查找配置文件的值 因此你可以更改配置在fig.yml(基于docker运行的时候) ,环境变量,jvm ,配置文件 2....
isomorphic-javascript-nashorn-example 使用Nashorn进行reactJS组件同构渲染的示例。 纳斯霍恩 Nashorn是Java的一部分,是Java的一部分,它是Java的嵌入式JavaScript引擎。... mvn spring-boot:run 然后转到:
mvn clean install # Dev Tab: ./dbcli migrate # <= Run this when you update migrations ./dbcli --help # <= Print dbcli help ./regen # <= Run this when you want to regen models (db/api) ./regen...
使用mvn clean install构建应用程序 使用Dockerfile创建docker镜像sudo docker build -t spring / workshop。 使用sudo docker run -p 9090:9090 spring / workshop使用相同的数据库网络启动该docker映像 使用邮递...
$ mvn spring-boot:run 此外,还有一个配置,您可以在其中一起运行所有服务。 docker-compose up 您也可以一次停止所有服务。 docker-compose stop 使用Compose,您还可以单独启动/停止服务。 docker-compose ...
Build the jar mvn clean install # Run it java -jar target/io.swagger.petstore-1.0-SNAPSHOT.jar 然后点击UI界面。 Endpoints 将返回空的 Pets,除了/v1/pets包含虚拟代码作为示例。 插件配置 <groupId>io....