- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个已经存在的带有 apache tile 和 thymeleaf 的客户端模块,效果很好。我想将它转换为 spring-boot 并想一步一步地做,但我真的坚持下去。我不想改变太多,当有人可以告诉我,我应该先做什么并让它运行时,我会喜欢它。我已经尝试在 javaConfig 中编写 servlet,但我也卡住了。也许有人可以帮助我。如果需要更多信息,请随时询问。
其他问题是,我是否需要从 xml 更改为 javaconfig?我更喜欢最简单的方法。但是一旦我向 pom 添加 spring-starter 依赖项,应用程序就不再工作了。
=======
聚甲醛:
<?xml version="1.0"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>at.compax.bbsng</groupId>
<artifactId>bbsng-client</artifactId>
<version>0.1.0-SNAPSHOT</version>
</parent>
<artifactId>bbsng-client-mvc</artifactId>
<name>bbsng-client-mvc</name>
<packaging>war</packaging>
<properties>
<org.apache.tiles-version>2.2.2</org.apache.tiles-version>
<org.thymeleaf-version>2.0.16</org.thymeleaf-version>
<slf4j-version>1.7.5</slf4j-version>
<jackson.version>1.9.10</jackson.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Apache Tiles -->
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-template</artifactId>
<version>${org.apache.tiles-version}</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-servlet</artifactId>
<version>${org.apache.tiles-version}</version>
</dependency>
<!-- ThyMeLeaf ... -->
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId>
<version>${org.thymeleaf-version}</version>
</dependency>
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring3</artifactId>
<version>${org.thymeleaf-version}</version>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-tiles2</artifactId>
<version>2.0.0</version>
</dependency>
<!-- Jackson JSON Mapper -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>${jackson.version}</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>
<!-- COMMONS ... -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>false</downloadJavadocs>
<additionalBuildcommands>
<buildCommand>
<name>org.springframework.ide.eclipse.core.springbuilder</name>
</buildCommand>
</additionalBuildcommands>
<additionalProjectnatures>
<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
</additionalProjectnatures>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<packagingExcludes>WEB-INF/web.xml</packagingExcludes>
<warName>${project.name}-${project.version}</warName>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>${java-version}</source>
<target>${java-version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.1</version>
</plugin>
</plugins>
</build>
<mvc:annotation-driven>
<mvc:async-support default-timeout="120000">
<mvc:callable-interceptors>
<bean class="at.compax.bbsng.client.mvc.TimeoutCallableProcessingInterceptor" />
</mvc:callable-interceptors>
</mvc:async-support>
</mvc:annotation-driven>
<context:component-scan base-package="at.compax.bbsng.client.mvc.rest" />
<!-- **************************************************************** -->
<!-- RESOURCE FOLDERS CONFIGURATION -->
<!-- Dispatcher configuration for serving static resources -->
<!-- **************************************************************** -->
<mvc:resources location="/images/" mapping="/images/**" />
<mvc:resources location="/css/" mapping="/css/**" />
<!-- **************************************************************** -->
<!-- SPRING ANNOTATION PROCESSING -->
<!-- **************************************************************** -->
<mvc:annotation-driven>
<mvc:async-support default-timeout="120000">
<mvc:callable-interceptors>
<bean class="at.compax.bbsng.client.mvc.TimeoutCallableProcessingInterceptor" />
</mvc:callable-interceptors>
</mvc:async-support>
</mvc:annotation-driven>
<context:component-scan base-package="at.compax.bbsng.client.mvc.web" />
<!-- **************************************************************** -->
<!-- MESSAGE EXTERNALIZATION/INTERNATIONALIZATION -->
<!-- Standard Spring MessageSource implementation -->
<!-- **************************************************************** -->
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basename" value="Messages" />
</bean>
<!-- **************************************************************** -->
<!-- THYMELEAF-SPECIFIC ARTIFACTS -->
<!-- TemplateResolver <- TemplateEngine <- ViewResolver -->
<!-- **************************************************************** -->
<bean id="templateEngine" class="org.thymeleaf.spring3.SpringTemplateEngine">
<property name="templateResolver" ref="templateResolver" />
<property name="additionalDialects">
<set>
<bean class="org.thymeleaf.extras.tiles2.dialect.TilesDialect"/>
</set>
</property>
</bean>
<!-- Configures the Tiles layout system using a specific thymeleaf-enabled Tiles Configurer -->
<bean id="tilesConfigurer" class="org.thymeleaf.extras.tiles2.spring.web.configurer.ThymeleafTilesConfigurer">
<property name="definitions">
<list>
<value>/WEB-INF/**/views.xml</value>
</list>
</property>
</bean>
<!-- Resolves view names returned by Controllers as names of Tiles definitions -->
<bean id="tilesViewResolver" class="org.thymeleaf.spring3.view.ThymeleafViewResolver">
<property name="viewClass" value="org.thymeleaf.extras.tiles2.spring.web.view.ThymeleafTilesView"/>
<property name="templateEngine" ref="templateEngine"/>
</bean>
<bean id="templateResolver" class="org.thymeleaf.templateresolver.ServletContextTemplateResolver">
<property name="prefix" value="/WEB-INF/views/" />
<property name="suffix" value=".html" />
<property name="templateMode" value="HTML5" />
</bean>
...
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- <dependency> -->
<!-- <groupId>org.springframework.boot</groupId> -->
<!-- <artifactId>spring-boot-starter-thymeleaf</artifactId> -->
<!-- </dependency> -->
<!-- Apache Tiles -->
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-template</artifactId>
<version>${org.apache.tiles-version}</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-servlet</artifactId>
<version>${org.apache.tiles-version}</version>
</dependency>
<!-- ThyMeLeaf ... -->
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-tiles2-spring4</artifactId>
<version>2.1.1.RELEASE</version>
</dependency>
...
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
@Configuration
@ComponentScan
public class WebMvcConfig {
@Bean
public ThymeleafTilesConfigurer tilesConfigurer() {
final ThymeleafTilesConfigurer configurer = new ThymeleafTilesConfigurer();
configurer.setDefinitions("/WEB-INF/**/views.xml");
return configurer;
}
@Bean
public ThymeleafViewResolver viewResolver() {
final ThymeleafViewResolver resolver = new ThymeleafViewResolver();
resolver.setViewClass(ThymeleafTilesView.class);
resolver.setTemplateEngine(templateEngine());
resolver.setCharacterEncoding(UTF_8);
return resolver;
}
private SpringTemplateEngine templateEngine() {
final SpringTemplateEngine engine = new SpringTemplateEngine();
engine.setTemplateResolver(templateResolver());
engine.setAdditionalDialects(dialects());
return engine;
}
private ServletContextTemplateResolver templateResolver() {
final ServletContextTemplateResolver resolver = new ServletContextTemplateResolver();
resolver.setPrefix("/WEB-INF/views/");
resolver.setSuffix(".html");
resolver.setTemplateMode("HTML5");
resolver.setCharacterEncoding(UTF_8);
return resolver;
}
private Set<IDialect> dialects() {
final Set<IDialect> set = new HashSet<IDialect>();
set.add(new TilesDialect());
return set;
}
}
@Configuration
@Import({ ServiceConfig.class, RestMvcConfig.class, WebMvcConfig.class })
@EnableAutoConfiguration(exclude = { ThymeleafAutoConfiguration.class })
public class ApplicationClientMvc implements WebApplicationInitializer {
public static void main(final String[] args) {
SpringApplication.run(ApplicationClientMvc.class, args);
}
@Bean
public ServletRegistrationBean applicationDispatcherRegistration(final DispatcherServlet dispatcherServlet) {
final ServletRegistrationBean registration = new ServletRegistrationBean(dispatcherServlet);
registration.setName("applicationServlet");
registration.addUrlMappings("/app/*");
registration.setAsyncSupported(true);
registration.setLoadOnStartup(1);
registration.addInitParameter("contextConfigLocation", "at.compax.bbsng.client.mvc.web.WebMvcConfig");
registration.setOrder(1);
return registration;
}
@Bean
public ServletRegistrationBean restDispatcherRegistration(final DispatcherServlet dispatcherServlet) {
final ServletRegistrationBean registration = new ServletRegistrationBean(dispatcherServlet);
registration.setName("restServlet");
registration.addUrlMappings("/rest/*");
registration.setAsyncSupported(true);
registration.setLoadOnStartup(0);
registration.addInitParameter("contextConfigLocation", "at.compax.bbsng.client.mvc.rest.RestMvcConfig");
registration.setOrder(0);
return registration;
}
@Override
public void onStartup(final ServletContext servletContext) throws ServletException {
final FilterRegistration.Dynamic encodingFilter = servletContext.addFilter("encoding-filter", new CharacterEncodingFilter());
encodingFilter.setInitParameter("encoding", UTF_8);
encodingFilter.setInitParameter("forceEncoding", "true");
encodingFilter.addMappingForUrlPatterns(null, true, "/*");
}
}
最佳答案
好吧,伙计们,
我明白了,我希望它对其他有类似问题的开发人员有所帮助。
在 POM 中,我删除了所有 Spring-Dependencies,并且只使用 Spring-Starter-Dependencies,如下所示:
...
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<!-- Apache Tiles -->
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-template</artifactId>
<version>${org.apache.tiles-version}</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-servlet</artifactId>
<version>${org.apache.tiles-version}</version>
</dependency>
<!-- Thymeleaf ... -->
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-tiles2-spring4</artifactId>
<version>2.1.1.RELEASE</version>
</dependency>
....
@Configuration
@Import({ ServiceConfig.class, RestMvcConfig.class, WebMvcConfig.class })
@EnableAutoConfiguration
public class ApplicationClientMvc {
public static void main(final String[] args) {
SpringApplication.run(ApplicationClientMvc.class, args);
}
@Bean
public DispatcherServlet dispatcherServlet() {
return new DispatcherServlet();
}
@Bean
public ServletRegistrationBean applicationDispatcherRegistration(final DispatcherServlet dispatcherServlet) {
final ServletRegistrationBean registration = new ServletRegistrationBean(dispatcherServlet);
registration.setName("applicationServlet");
registration.addUrlMappings("/app/*");
registration.setAsyncSupported(true);
registration.setLoadOnStartup(1);
registration.addInitParameter("contextConfigLocation", "a.c.b.c.m.w.WebMvcConfig");
registration.setOrder(1);
return registration;
}
@Bean
public ServletRegistrationBean restDispatcherRegistration(final DispatcherServlet dispatcherServlet) {
final ServletRegistrationBean registration = new ServletRegistrationBean(dispatcherServlet);
registration.setName("restServlet");
registration.addUrlMappings("/rest/*");
registration.setAsyncSupported(true);
registration.setLoadOnStartup(0);
registration.addInitParameter("contextConfigLocation", "a.c.b.c.m.r.RestMvcConfig");
registration.setOrder(0);
return registration;
}
}
....mvc.rest
中:
@Configuration
@ComponentScan
public class WebMvcConfig extends WebMvcAutoConfigurationAdapter {
@Autowired public SpringTemplateEngine templateEngine;
@Bean
public ThymeleafTilesConfigurer tilesConfigurer() {
final ThymeleafTilesConfigurer configurer = new ThymeleafTilesConfigurer();
configurer.setDefinitions(ThymeleafAutoConfiguration.DEFAULT_PREFIX + "**/views.xml");
return configurer;
}
@Bean
public ThymeleafViewResolver thymeleafViewResolver() {
final ThymeleafViewResolver resolver = new ThymeleafViewResolver();
resolver.setViewClass(ThymeleafTilesView.class);
resolver.setTemplateEngine(templateEngine);
resolver.setCharacterEncoding(UTF_8);
return resolver;
}
@Bean
public TilesDialect tilesDialect() {
return new TilesDialect();
}
//
@Value("${server.session-timeout}") private Long sessionTimeOut;
@Override
public void configureAsyncSupport(final AsyncSupportConfigurer configurer) {
configurer.setDefaultTimeout(sessionTimeOut * 1000L);
configurer.registerCallableInterceptors(timeoutInterceptor());
}
@Bean
public TimeoutCallableProcessingInterceptor timeoutInterceptor() {
return new TimeoutCallableProcessingInterceptor();
}
}
@Configuration
@ComponentScan
public class RestMvcConfig {}
<link rel="stylesheet" type="text/css" media="screen, projection"
href="/static/css/bootstrap.css"
th:href="@{/css/bootstrap.css}" />
<link rel="stylesheet" type="text/css" media="screen, projection"
href="/static/css/bootstrap-responsive.css"
th:href="@{/css/bootstrap-responsive.css}" />
java/src/webapp
不再需要了!!!
org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/layout/login", template might not exist or might not be accessible by any of the configured Template Resolvers
at org.thymeleaf.TemplateRepository.getTemplate(TemplateRepository.java:245)
at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1104)
at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1060)
at org.thymeleaf.extras.tiles2.renderer.ThymeleafAttributeRenderer.write(ThymeleafAttributeRenderer.java:155)
at org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:106)
at org.thymeleaf.extras.tiles2.renderer.MetadataCleaningAttributeRendererWrapper.render(MetadataCleaningAttributeRendererWrapper.java:111)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:670)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:690)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:644)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:627)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:321)
at org.thymeleaf.extras.tiles2.spring4.web.view.ThymeleafTilesView.render(ThymeleafTilesView.java:125)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1221)
at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1005)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:952)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:110)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$ApplicationContextHeaderFilter.doFilterInternal(EndpointWebMvcAutoConfiguration.java:280)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.springframework.boot.actuate.autoconfigure.MetricFilterAutoConfiguration$MetricsFilter.doFilterInternal(MetricFilterAutoConfiguration.java:90)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1736)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1695)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
<definition name="home" extends="standard1ColLayout">
<put-attribute name="title" value="/home/title :: content" type="thymeleaf" />
<put-attribute name="body" value="/home/body :: content" type="thymeleaf" />
</definition>
<definition name="home" extends="standard1ColLayout">
<put-attribute name="title" value="./home/title :: content" type="thymeleaf" />
<put-attribute name="body" value="./home/body :: content" type="thymeleaf" />
</definition>
关于spring-mvc - Spring-Boot + Spring-MVC + Thymeleaf + Apache Tiles,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27583278/
这是引用 Google Tile Map 或 Bing Maps。是否可以在不使用任何类型的内部计算指定缩放级别(或 LevelOfDetails)的情况下获得 Tile Count、Tile X、T
我有一个 Tiles 模板,其中每个页面都提供一个标题,一些要添加到 中的内容,要放入一些混凝土的东西 ,以及附加到 的内容在一切之后。 大部分内容都非常小,因为页面是用 JS 呈现的。 我怎样才
我正在使用 Apache Tiles 2.1 开展一个项目。 我遇到了一个问题,即使用列表属性扩展模板会创建这些列表项的重复项...每个继承级别都有一组重复项。 作为示例,以下是基本定义及其将生成的页
我在 HTML 的背景层中有一个重复的水平图案。我可以使用 1 像素宽的图像或它的倍数(10、20、50...)来实现。 问题是: 哪个更好? 使用薄(小文件大小)图像并使其重复很多 使用更大的图片,
我们正在使用 Apache Tiles 3.0。 在我们的 Apache Tiles-Def 文件中,我们偶尔会遇到此 DTD 引用的问题,这可能是因为该站点不可靠。偶尔会出现“Reading Def
我在我的网络应用程序中使用 Tiles。我在瓷砖中使用了标准布局 (standard.jsp)。在 standard.jsp 之上有很多包含,涉及标签库等。 让我们做一个简化的例子。 标准.jsp:
我正在制作一个基于 2d tile 的游戏,我试图通过对 tile 结构中的值使用位字段和字节来保持我的 tile 结构小: struct Tile { // 3 bytes (24 bits
我已经在 Tiled 中制作了一张 map ,并且已经生成了一个 JSON。每当我尝试在 Chrome 中加载 map 时,它根本无法加载。当我去检查网站时,有类似警告: 在来自 Tiled 的 Js
我使用 struts 2.3.16 和 tiles 2.0.6。 具有空属性(以及其他属性)的图 block 定义: 一些其他定义扩展了它,他们可以选择填入值: 或者也留空。 我试图通过使用 st
我想在Struts2框架中使用tile。作为用于显示图 block 内容的标签,tiles:insert 和tiles:get 之间的基本区别是什么? 最佳答案 is equivalent to
我正在从 Strut1 + Tiles 项目迁移到 SpringMVC 和 Apache Tiles 3。我对Struts1+Tiles只了解一点点,它太旧了,我陷入了Struts-tiles中的Co
我正在使用Tiles,Spring和Hibernate创建一个应用程序。 在运行时,它显示以下错误: Can not find the tag library descriptor for "http
目前我在计划任务的帮助下实现了我的翻转图块,因此类似方法的一个问题是翻转图块将在时间间隔内翻转相同的图像。所以我想要实现的是我需要像循环瓷砖一样翻转我的图像。即一个接一个的方式。这里要注意的一件事是我
我正在使用 v0.6.2 和 Cocos2D v0.99.5,现在我真的非常需要为我的一些图 block 制作动画。我读了part of a wiki关于如何为图 block 制作动画,但它似乎与 M
我有一个图 block ,其中列出了提供给它的对象中的文章。此图 block 是大多数页面的一部分,但不是全部页面。有没有什么方法可以自动仅向需要它的页面提供对象(包含特定图 block )?现在我只
我正在寻找一种解决方案,以根据游戏 block 的类型对我的游戏 block 进行分组。瓷砖存储在二维数组中,类型为空和水,分组的瓷砖将存储在组类中。 所以如果我有二维数组: 0, 0, 0, 0,
我在今天的 maven 构建过程中遇到以下错误。 Unable to resolve artifact: Unable to get dependency information: Unable to
我正在尝试让 Apache Tiles' put-list-attribute 与 Thymeleaf 一起工作。 这是我尝试过的: 来自 Tiles 配置: 来自 thymlea
我在 UI 的 mat-grid-list 中动态显示 mat-grid-tile,其数量和数据随着后端值的变化而变化。它们是动态生成的。单击任何 mat-grid-tile 都会调用一个函数并将数据
我制作了一个 Tiled 游戏。现在,我正在通过增加场景中的节点数量来对手机的功能进行压力测试。有基于物理的东西,AI 运动,日夜系统,粒子在这里和那里突然出现以及我的场景的引擎盖下发生的许多其他事情
我是一名优秀的程序员,十分优秀!