所以我想在不发送重定向的情况下返回HTML页面.原因是使用重定向更改了浏览器中的URL,如果他们没有登录,我无法将某人重定向到登录.有什么最直接的方法呢?看起来它应该很简单而不使用jsp或其他服务器端视图技术.
我正在查看我的新分析,我几乎在所有情况下都看到超过60%-70%的时间都花在了MixedGrailsControllerHelper.executeAction()中.我已经检查了跟踪,并且在控制器已经处理完动作后,它在executeAction()中花费了.所以它是在调用invokeAction()之后,但我找不到任何可能阻止它的锁.似乎所有的时间都花在executeAction()上.它调用的其他方法没有显示任何花费在它们上面的重要时间 我正在使用通常返回JSON数据的MongoDB gorm插件.
所以有什么问题?
所以我有一个PieChart正在使用setMaxAngle创造的东西就像一个标尺.但是,我需要删除它下面的重要空白.我找不到任何修改视口的方法PieChart.那我怎么能参考白色空间呢?见下图.
我的布局如下:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.nextraq.anders.ui.dashboard.DashboardActivityFragment"
tools:showIn="@layout/dashboard_activity">
<android.support.v7.widget.CardView
style="@style/AndersMaterialTheme.Dashboard.Gadget"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:padding="@dimen/card_margin"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/gadgetTitle"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/mobiles"
android:ellipsize="end"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium" />
<com.github.mikephil.charting.charts.PieChart
android:id="@+id/mobileStateChart"
android:layout_below="@id/gadgetTitle"
android:layout_width="match_parent"
android:layout_height="300dp"/>
</RelativeLayout>
</android.support.v7.widget.CardView>
Run Code Online (Sandbox Code Playgroud)
根据规范,引入SVG需要将新值添加到CSS显示属性:svg.SVG中的元素具有默认样式:
svg { display: block; overflow: hidden }
svg * { display: svg }
Run Code Online (Sandbox Code Playgroud)
那讲得通.包含SVG的SVG元素设置为块,SVG元素中包含的每个元素都显示为:svg.它只是意味着将此SVG元素传递给要呈现的SVG引擎,但如果将SVG文档中的元素设置为其他值(内联,块等),该元素会发生什么?规范没有解释那会做什么甚至是什么意思.
我在尝试向 Sonatype 发布新版本软件时收到错误。我已成功完成mvn release:prepare,但当我这样做时,mvn release:perform出现以下错误:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:52.660s
[INFO] Finished at: Fri Feb 14 22:32:52 EST 2014
[INFO] Final Memory: 28M/263M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project flexjson: Failed to deploy artifacts: Could not transfer artifact net.sf.flexjson:flexjson:jar:3.2 from/to sonatype-nexus-staging (https://oss.sonatype.org/service/local/staging/deploy/maven2/): Failed to transfer file: https://oss.sonatype.org/service/local/staging/deploy/maven2/net/sf/flexjson/flexjson/3.2/flexjson-3.2.jar. Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of …Run Code Online (Sandbox Code Playgroud) 当使用 Spring Boot文档中的 logback 配置时,将其放入logback-spring.xml控制台中会打印以下内容:
CONSOLE_LOG_PATTERN_IS_UNDEFINED CONSOLE_LOG_PATTERN_IS_UNDEFINEDCONSOLE_LOG_PATTERN_IS_UNDEFINEDCONSOLE_LOG_PATTERN_IS_UNDEFINEDCONSOLE_LOG_PATTERN_IS_UNDEFINEDCONSOLE_LOG_PATTERN_IS_UNDEFINED....
Run Code Online (Sandbox Code Playgroud)
这就是记录 1 个日志条目时打印的全部内容。所以想象一下那条很长的线。logback配置是这样的:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/default.xml"/>
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
<root level="INFO">
<appender-ref ref="CONSOLE" />
</root>
<logger name="org.springframework.web" level="DEBUG"/>
</configuration>
Run Code Online (Sandbox Code Playgroud)
因此,阅读有关此内容的各种内容后,我尝试添加一个<springProperty...forCONSOLE_LOG_PATTERN链接到spring.console.pattern. 那行不通。这就是我认为default.xml应该做的。
那么为什么这个建议的配置不起作用呢?
我想将一些数据存储到Android设备上的文件(而不是数据库)中.目前我正在使用Context.getFileDir()作为父目录.但是,当您更新应用程序时,该目录将被删除.是否有一个我可以在Context中使用的目录,当用户更新应用程序时,该目录不会被篡改?是否必须是SD卡,因为并非所有手机都能提供SD卡?
我正在制作客户管理软件.有几个JPanels上面有很多内容,不断与数据库通信.在数据库中是客户数据,产品等.
为了更快地访问数据库数据,首先我将它全部加载到自己的ArrayList中,例如ArrayList<Customer>.如果用户更改此数据,则必须在类和数据库中更改它.
由于JPanel View看起来非常"完整"(塞满其他JPanel和JTabbedPanes,切换到CardLayout),我认为最好为每个"主"JPanel创建一个自己的类并将它们全部链接起来View.
例如,JPanel的自有类Customer,其中所有客户数据都可以被看到和编辑,对于产品等
是相同的.这是有意义还是不方便?我只想这样做来外包代码并使类更清晰,尤其如此View.
有没有类似设计模式来处理这个问题?