首页 \ 问答 \ Wicket + Spring Boot + .war文件部署(Wicket + Spring Boot + .war file deployment)

Wicket + Spring Boot + .war文件部署(Wicket + Spring Boot + .war file deployment)

建立在这里的例子: https//github.com/Pentadrago/spring-boot-example-wicket
并考虑到这里的jar-to-war指南: https//spring.io/guides/gs/convert-jar-to-war/
我想将现有的Wicket + Spring(使用data-jpa和security)转换为Spring Boot。 让fat-jar设置工作相当容易,但到目前为止,我已经证明不可能将此设置转换为.war文件以在Tomcat中部署。

问题源于冲突的指示:

  • 一方面从非@Configurationextends org.springframework.boot.context.web.SpringBootServletInitializer ,用于jar-to-war转换指南,
  • 而另一个implements org.springframework.boot.context.embedded.ServletContextInitializer ,用于fat-jar Wicket示例的@Configuration标记类。

我无法将两者对齐,以便在使用嵌入式容器进行调试时以及在Tomcat中部署为.war时获得正常工作的应用程序。

任何人都可以告诉我如何设置一个弹簧启动的wicket应用程序,我可以部署为.war文件?


Building on the example here: https://github.com/Pentadrago/spring-boot-example-wicket
And taking into account the jar-to-war guide here: https://spring.io/guides/gs/convert-jar-to-war/
I'd like to convert my existing Wicket + Spring (using data-jpa and security) to Spring Boot. It's been fairly easy to get the fat-jar setup to work, but it has so far proved impossible for me to convert this setup into a .war file to deploy in Tomcat.

The issue stems from the conflicting instructions to:

  • on the one hand extends org.springframework.boot.context.web.SpringBootServletInitializer from a non-@Configuration class for the jar-to-war conversion guide,
  • while on the other implements org.springframework.boot.context.embedded.ServletContextInitializer for a @Configuration marked class for the fat-jar Wicket example.

I've not been able to align the two such that I get a working application both when debugging with the embedded container, and when deployed as .war in Tomcat.

Can anyone tell me how I can setup a spring-boot enabled wicket application that I can deploy as a .war file?


原文:https://stackoverflow.com/questions/25532830
更新时间:2023-09-30 09:09

最满意答案

在你的三角形上:

  1. 删除保证金
  2. 明确设置路径高度(“22”非常接近你所拥有的)。

这应该可以防止三角形的阴影被剪裁。

这是xaml:

    <Grid Height="50" Width="60" >
<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20" />
        <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <Rectangle Grid.Column="1" Stroke="Black" Fill="White" >
        <Rectangle.Effect>
            <DropShadowEffect Opacity="0.5" ShadowDepth="4" BlurRadius="10" />
        </Rectangle.Effect>
    </Rectangle>
    <Path Fill="White" Stretch="Fill" Stroke="Black" HorizontalAlignment="Left" 
        Data="M44.386378,164.8791 L22.983157,171.42119 44.713478,176.58567" Width="23.167" Height="22">
        <Path.Effect>
            <DropShadowEffect BlurRadius="10" Opacity="0.5" ShadowDepth="4" />
        </Path.Effect>
    </Path>
</Grid>


On your triangle:

  1. Remove the Margin
  2. Set the Path height explicitly ("22" is pretty close what you have there).

That should prevent the triangle's shadow from being clipped.

Here's the xaml for that:

    <Grid Height="50" Width="60" >
<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="20" />
        <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <Rectangle Grid.Column="1" Stroke="Black" Fill="White" >
        <Rectangle.Effect>
            <DropShadowEffect Opacity="0.5" ShadowDepth="4" BlurRadius="10" />
        </Rectangle.Effect>
    </Rectangle>
    <Path Fill="White" Stretch="Fill" Stroke="Black" HorizontalAlignment="Left" 
        Data="M44.386378,164.8791 L22.983157,171.42119 44.713478,176.58567" Width="23.167" Height="22">
        <Path.Effect>
            <DropShadowEffect BlurRadius="10" Opacity="0.5" ShadowDepth="4" />
        </Path.Effect>
    </Path>
</Grid>

相关问答

更多
  • 不确定这里的波动究竟是什么意思,但是如果你想改变text-shadow的模糊半径,你可以在这里使用animation ...... 我正在使用@keyframes和动画X Y和模糊text-shadow 。 如果需要,只需将值8px更改为其他值,即可为特定轴或模糊半径设置动画。 #shadow { text-shadow: 4px 4px 4px #aaa; animation: animate-shadow 1s ease-in infinite; } @keyframes anima ...
  • 使用JavaFx你应该使用Button而不是JButton ( Swing组件)。 您可以编程设置阴影,例如: DropShadow shadow = new DropShadow(); Button button = new Button(); button.setEffect(shadow); 这里有一个关于 JavaDoc的关于DropShadow的参考 ,可能会派上用场。 Using JavaFx you should use Button rather than JButton(Swing co ...
  • 在你的三角形上: 删除保证金 明确设置路径高度(“22”非常接近你所拥有的)。 这应该可以防止三角形的阴影被剪裁。 这是xaml:
  • 由于Grid是一个Panel,它继承了Panel.ZIndex附加属性。 可以使用这个属性从字面上设置Z-index,而不是像Phil在他的例子中那样从XAML顺序中推断它。 非工作示例可以用一对附加属性修复:
  • 您可以使用伪元素 - DEMO上的径向渐变来执行此操作 CSS: ul { margin: 5em auto; padding: 0; background: silver; text-align: center; } li { display: inline-block; position: relative; margin: 1em; padding: .1em 2em; background: #414141; color ...
  • 预IE 9: filter: progid:DXImageTransform.Microsoft.dropShadow(attribute1=value1, attribute2=value2, etc); 后IE8: -ms-filter: "progid:DXImageTransform.Microsoft.dropShadow(attribute1=value1, attribute2=value2, etc)"; Pre-IE 9: filter: progid:DXImageTransform ...
  • 使用效果的“正确”方法 - 所需的引号应该是这样的: import QtQuick 2.0 import QtGraphicalEffects 1.0 Item { id: root width: 300 height: 300 Item { id: src anchors.fill: parent Rectangle { id: myRectangle anchors.centerIn: p ...
  • 将RenderTransform应用于阴影形状。 设置比例以使其变大:
  • 你可以参考下面的链接在uitableview中的阴影效果,这将有助于你 尝试这个 一个基本的观点是它是一个CALayer层。 您可以通过视图的图层属性来访问它: myView.layer 在文档中CALayers有几个控制阴影的属性。 你应该能够告诉导航栏的图层投下阴影。 随着你想要投下阴影的任何其他内容层。 myView.layer.shadowOffset myView.layer.shadowRadius 您需要确保将QuartzCore框架添加到您的项目以访问此属性 This can be ac ...
  • 您可以尝试使用box-shadow并根据scrollTop值动态应用它onscroll事件。 也许是这样的: document.querySelector('div').onscroll = function() { this.classList[this.scrollTop < 20 ? 'add' : 'remove']('shadow-top'); this.classList[this.scrollHeight - this.clientHeight - this.scrollTop ...

相关文章

更多

最新问答

更多
  • python的访问器方法有哪些
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。
  • 响应navi重叠h1和nav上的h1链接不起作用(Responsive navi overlaps h1 and navi links on h1 isn't working)
  • 在C中读取文件:“r”和“a +”标志的不同行为(Reading a File in C: different behavior for “r” and “a+” flags)
  • NFC提供什么样的带宽?(What Kind of Bandwidth does NFC Provide?)
  • 元素上的盒子阴影行为(box-shadow behaviour on elements)
  • Laravel检查是否存在记录(Laravel Checking If a Record Exists)
  • 设置base64图像的大小javascript - angularjs(set size of a base64 image javascript - angularjs)
  • 想学Linux 运维 深圳有哪个培训机构好一点
  • 为什么有时不需要在lambda中捕获一个常量变量?(Why is a const variable sometimes not required to be captured in a lambda?)
  • 在Framework 3.5中使用服务器标签<%=%>设置Visible属性(Set Visible property with server tag <%= %> in Framework 3.5)
  • AdoNetAppender中的log4net连接类型无效(log4net connection type invalid in AdoNetAppender)
  • 错误:发送后无法设置标题。(Error: Can't set headers after they are sent. authentication system)
  • 等待EC2实例重启(Wait for an EC2 instance to reboot)
  • 如何在红宝石中使用正则表达式?(How to do this in regex in ruby?)
  • 使用鼠标在OpenGL GLUT中绘制多边形(Draw a polygon in OpenGL GLUT with mouse)
  • 江民杀毒软件的KSysnon.sys模块是什么东西?
  • 处理器在传递到add_xpath()或add_value()时调用了什么顺序?(What order are processors called when passed into add_xpath() or add_value()?)
  • sp_updatestats是否导致SQL Server 2005中无法访问表?(Does sp_updatestats cause tables to be inaccessible in SQL Server 2005?)
  • 如何创建一个可以与持续运行的服务交互的CLI,类似于MySQL的shell?(How to create a CLI that can interact with a continuously running service, similar to MySQL's shell?)
  • AESGCM解密失败的MAC(AESGCM decryption failing with MAC)
  • SQL查询,其中字段不包含$ x(SQL Query Where Field DOES NOT Contain $x)
  • PerSession与PerCall(PerSession vs. PerCall)
  • C#:有两个构造函数的对象:如何限制哪些属性设置在一起?(C#: Object having two constructors: how to limit which properties are set together?)
  • 平衡一个精灵(Balancing a sprite)
  • n2cms Asp.net在“文件”菜单上给出错误(文件管理器)(n2cms Asp.net give error on Files menu (File Manager))
  • Zurb Foundation 4 - 嵌套网格对齐问题(Zurb Foundation 4 - Nested grid alignment issues)
  • 湖北京山哪里有修平板计算机的